sectorblocks

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 14, 2020 License: Apache-2.0, MIT Imports: 24 Imported by: 15

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("not found")

Functions

This section is empty.

Types

type SealSerialization

type SealSerialization uint8
const (
	SerializationUnixfs0 SealSerialization = 'u'
)

type SectorBlockStore

type SectorBlockStore struct {
	// contains filtered or unexported fields
}

func (*SectorBlockStore) AllKeysChan

func (s *SectorBlockStore) AllKeysChan(ctx context.Context) (<-chan cid.Cid, error)

func (*SectorBlockStore) DeleteBlock

func (s *SectorBlockStore) DeleteBlock(cid.Cid) error

func (*SectorBlockStore) Get

func (s *SectorBlockStore) Get(c cid.Cid) (blocks.Block, error)

func (*SectorBlockStore) GetSize

func (s *SectorBlockStore) GetSize(cid.Cid) (int, error)

func (*SectorBlockStore) Has

func (s *SectorBlockStore) Has(c cid.Cid) (bool, error)

func (*SectorBlockStore) HashOnRead

func (s *SectorBlockStore) HashOnRead(enabled bool)

func (*SectorBlockStore) Put

func (*SectorBlockStore) PutMany

func (s *SectorBlockStore) PutMany([]blocks.Block) error

type SectorBlocks

type SectorBlocks struct {
	*storage.Miner
	// contains filtered or unexported fields
}

func NewSectorBlocks

func NewSectorBlocks(miner *storage.Miner, ds dtypes.MetadataDS, sb sectorbuilder.Interface) *SectorBlocks

func (*SectorBlocks) AddUnixfsPiece

func (st *SectorBlocks) AddUnixfsPiece(ctx context.Context, r UnixfsReader, dealID uint64) (sectorID uint64, err error)

func (*SectorBlocks) GetRefs

func (st *SectorBlocks) GetRefs(k cid.Cid) ([]api.SealedRef, error)

func (*SectorBlocks) GetSize

func (st *SectorBlocks) GetSize(k cid.Cid) (uint64, error)

func (*SectorBlocks) Has

func (st *SectorBlocks) Has(k cid.Cid) (bool, error)

func (*SectorBlocks) List

func (st *SectorBlocks) List() (map[cid.Cid][]api.SealedRef, error)

func (*SectorBlocks) SealedBlockstore

func (st *SectorBlocks) SealedBlockstore(approveUnseal func() error) *SectorBlockStore

type UnixfsReader

type UnixfsReader interface {
	files.File

	// ReadBlock reads data from a single unixfs block. Data is nil
	// for intermediate nodes
	ReadBlock(context.Context) (data []byte, offset uint64, nd ipld.Node, err error)
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL