Documentation
¶
Index ¶
Constants ¶
View Source
const CName = "node.oldstorage"
Variables ¶
View Source
var ( ErrUnknownSpaceId = errors.New("unknown space id") ErrNoLastRecordId = errors.New("no last record id") )
View Source
var ( ErrUnknownAclId = errors.New("unknown acl id") ErrUnknownRecord = errors.New("unknown record") )
View Source
var ( ErrLocked = errors.New("space storage locked") ErrSpaceIdIsEmpty = errors.New("space id is empty") )
Functions ¶
This section is empty.
Types ¶
type ChangeSizeStats ¶
type DeletionStorage ¶
type DeletionStorage interface {
SpaceStatus(spaceId string) (status SpaceStatus, err error)
SetSpaceStatus(spaceId string, status SpaceStatus) (err error)
LastRecordId() (id string, err error)
SetLastRecordId(id string) (err error)
Close() (err error)
}
func OpenDeletionStorage ¶
func OpenDeletionStorage(rootPath string) (ds DeletionStorage, err error)
type NodeStorage ¶
type NodeStorage interface {
oldstorage.SpaceStorageProvider
DeletionStorage() DeletionStorage
SpaceStorage(spaceId string) (oldstorage.SpaceStorage, error)
TryLockAndDo(spaceId string, do func() error) (err error)
AllSpaceIds() (ids []string, err error)
OnDeleteStorage(onDelete func(ctx context.Context, spaceId string))
OnWriteHash(onWrite func(ctx context.Context, spaceId, hash string))
StoreDir(spaceId string) (path string)
DeleteSpaceStorage(ctx context.Context, spaceId string) error
}
func New ¶
func New() NodeStorage
type NodeStorageStats ¶
type NodeStorageStats interface {
GetSpaceStats(treeTop int) (SpaceStats, error)
}
type SpaceStats ¶
type SpaceStats struct {
ObjectsCount int `json:"objectsCount,omitempty"`
DeletedObjectsCount int `json:"deletedObjectsCount"`
ChangesCount int `json:"changesCount"`
ChangeSize ChangeSizeStats `json:"changeSizeStats,omitempty"`
TreeStats []TreeStat `json:"treeStats,omitempty"`
// contains filtered or unexported fields
}
type SpaceStatus ¶
type SpaceStatus int
const ( SpaceStatusOk SpaceStatus = iota SpaceStatusRemove )
Source Files
¶
Click to show internal directories.
Click to hide internal directories.