Documentation ¶
Index ¶
Constants ¶
View Source
const CName = "filenode.index"
Variables ¶
View Source
var (
ErrCidsNotExist = errors.New("cids not exist")
)
View Source
var ErrLimitExceed = errors.New("limit exceed")
Functions ¶
Types ¶
type CheckResult ¶ added in v0.6.7
type CheckResult struct { Key string `json:"key"` CidEntry *indexproto.CidEntry `json:"cid,omitempty"` FileEntry *indexproto.FileEntry `json:"file,omitempty"` SpaceEntry *indexproto.SpaceEntry `json:"space,omitempty"` GroupEntry *indexproto.GroupEntry `json:"group,omitempty"` CidRef uint64 `json:"cidRef,omitempty"` Description string `json:"description"` SpaceId string `json:"spaceId,omitempty"` }
type CidEntries ¶ added in v0.5.0
type CidEntries struct {
// contains filtered or unexported fields
}
func (*CidEntries) Release ¶ added in v0.5.0
func (ce *CidEntries) Release()
type Index ¶
type Index interface { FileBind(ctx context.Context, key Key, fileId string, cidEntries *CidEntries) (err error) FileUnbind(ctx context.Context, kye Key, fileIds ...string) (err error) FileInfo(ctx context.Context, key Key, fileIds ...string) (fileInfo []FileInfo, err error) FilesList(ctx context.Context, key Key) (fileIds []string, err error) CheckKey(ctx context.Context, key string) (exists bool, err error) GroupInfo(ctx context.Context, groupId string) (info GroupInfo, err error) SpaceInfo(ctx context.Context, key Key) (info SpaceInfo, err error) BlocksGetNonExistent(ctx context.Context, bs []blocks.Block) (nonExistent []blocks.Block, err error) BlocksLock(ctx context.Context, bs []blocks.Block) (unlock func(), err error) BlocksAdd(ctx context.Context, bs []blocks.Block) (err error) OnBlockUploaded(ctx context.Context, bs ...blocks.Block) WaitCidExists(ctx context.Context, c cid.Cid) (err error) CidExists(ctx context.Context, c cid.Cid) (ok bool, err error) CidEntries(ctx context.Context, cids []cid.Cid) (entries *CidEntries, err error) CidEntriesByBlocks(ctx context.Context, bs []blocks.Block) (entries *CidEntries, err error) CidExistsInSpace(ctx context.Context, key Key, cids []cid.Cid) (exists []cid.Cid, err error) SetGroupLimit(ctx context.Context, groupId string, limit uint64) (err error) SetSpaceLimit(ctx context.Context, key Key, limit uint64) (err error) CheckLimits(ctx context.Context, key Key) error Migrate(ctx context.Context, key Key) error Check(ctx context.Context, key Key, doFix bool) (checkResults []CheckResult, err error) SpaceDelete(ctx context.Context, key Key) (ok bool, err error) app.ComponentRunnable }
Source Files ¶
Directories ¶
Path | Synopsis |
---|---|
Package mock_index is a generated GoMock package.
|
Package mock_index is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.