index

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2023 License: MIT Imports: 5 Imported by: 7

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrCidsNotExist        = errors.New("cids not exist")
	ErrTargetStorageExists = errors.New("target storage exists")
	ErrStorageNotFound     = errors.New("storage not found")
)

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)
	StorageInfo(ctx context.Context, key string) (info StorageInfo, err error)
	GetNonExistentBlocks(ctx context.Context, bs []blocks.Block) (nonExists []blocks.Block, err error)
	Bind(ctx context.Context, key, fileId string, bs []blocks.Block) error
	BindCids(ctx context.Context, key string, fileId string, cids []cid.Cid) error
	UnBind(ctx context.Context, key, fileId string) (err error)
	ExistsInStorage(ctx context.Context, key string, ks []cid.Cid) (exists []cid.Cid, err error)
	FileInfo(ctx context.Context, key, fileId string) (info FileInfo, err error)
	StorageSize(ctx context.Context, key string) (size uint64, err error)
	Lock(ctx context.Context, ks []cid.Cid) (unlock func(), err error)
	AddBlocks(ctx context.Context, upload []blocks.Block) error
	MoveStorage(ctx context.Context, fromKey, toKey string) error
	app.Component
}

type StorageInfo added in v0.4.2

type StorageInfo struct {
	Key       string
	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