remoteblockstore

package
v1.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRemoteBlockstore

func NewRemoteBlockstore(api RemoteBlockstoreAPI) blockstore.Blockstore

Types

type RemoteBlockstore

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

RemoteBlockstore is a read-only blockstore over all cids across all pieces on a provider.

func (*RemoteBlockstore) AllKeysChan

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

func (*RemoteBlockstore) DeleteBlock

func (ro *RemoteBlockstore) DeleteBlock(context.Context, cid.Cid) error

--- UNSUPPORTED BLOCKSTORE METHODS -------

func (*RemoteBlockstore) Get

func (ro *RemoteBlockstore) Get(ctx context.Context, c cid.Cid) (b blocks.Block, err error)

func (*RemoteBlockstore) GetSize

func (ro *RemoteBlockstore) GetSize(ctx context.Context, c cid.Cid) (int, error)

func (*RemoteBlockstore) Has

func (ro *RemoteBlockstore) Has(ctx context.Context, c cid.Cid) (bool, error)

func (*RemoteBlockstore) HashOnRead

func (ro *RemoteBlockstore) HashOnRead(_ bool)

func (*RemoteBlockstore) Put

func (*RemoteBlockstore) PutMany

type RemoteBlockstoreAPI

type RemoteBlockstoreAPI interface {
	BlockstoreGet(ctx context.Context, c cid.Cid) ([]byte, error)
	BlockstoreHas(ctx context.Context, c cid.Cid) (bool, error)
	BlockstoreGetSize(ctx context.Context, c cid.Cid) (int, error)
}

Jump to

Keyboard shortcuts

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