fileblockstore

package
v0.5.23-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const CName = "common.commonfile.fileblockstore"

Variables

View Source
var (
	ErrCIDNotFound   = fileprotoerr.ErrCIDNotFound
	ErrCIDUnexpected = fileprotoerr.ErrUnexpected
)

Functions

func CtxGetFileId

func CtxGetFileId(ctx context.Context) (spaceId string)

func CtxGetSpaceId

func CtxGetSpaceId(ctx context.Context) (spaceId string)

func CtxWithFileId

func CtxWithFileId(ctx context.Context, spaceId string) context.Context

func CtxWithSpaceId

func CtxWithSpaceId(ctx context.Context, spaceId string) context.Context

Types

type BlockStore

type BlockStore interface {
	Get(ctx context.Context, k cid.Cid) (blocks.Block, error)
	GetMany(ctx context.Context, ks []cid.Cid) <-chan blocks.Block
	Add(ctx context.Context, b []blocks.Block) error
	Delete(ctx context.Context, c cid.Cid) error
}

type BlockStoreLocal

type BlockStoreLocal interface {
	BlockStore
	ExistsCids(ctx context.Context, ks []cid.Cid) (exists []cid.Cid, err error)
	NotExistsBlocks(ctx context.Context, bs []blocks.Block) (notExists []blocks.Block, err error)
}

type BlockStoreSpaceIds

type BlockStoreSpaceIds interface {
	SpaceIds() []string
}

Jump to

Keyboard shortcuts

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