index

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCidsNotExist = errors.New("cids not exist")
)

Functions

This section is empty.

Types

type FileInfo

type FileInfo struct {
	BytesUsage uint64
	CidCount   uint32
}

type Index

type Index interface {
	Exists(ctx context.Context, k cid.Cid) (exists bool, err error)
	IsAllExists(ctx context.Context, cids []cid.Cid) (exists bool, err error)
	SpaceInfo(ctx context.Context, spaceId string) (info SpaceInfo, err error)
	GetNonExistentBlocks(ctx context.Context, bs []blocks.Block) (nonExists []blocks.Block, err error)
	Bind(ctx context.Context, spaceId, fileId string, bs []blocks.Block) error
	BindCids(ctx context.Context, spaceId string, fileId string, cids []cid.Cid) error
	UnBind(ctx context.Context, spaceId, fileId string) (err error)
	ExistsInSpace(ctx context.Context, spaceId string, ks []cid.Cid) (exists []cid.Cid, err error)
	FileInfo(ctx context.Context, spaceId, fileId string) (info FileInfo, err error)
	SpaceSize(ctx context.Context, spaceId string) (size uint64, err error)
	Lock(ctx context.Context, ks []cid.Cid) (unlock func(), err error)
	AddBlocks(ctx context.Context, upload []blocks.Block) error
	app.Component
}

type SpaceInfo

type SpaceInfo struct {
	FileCount int
	CidCount  int
}

Directories

Path Synopsis
Package mock_index is a generated GoMock package.
Package mock_index is a generated GoMock package.

Jump to

Keyboard shortcuts

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