Documentation ¶
Index ¶
- Variables
- type ConcurrentWorkersLimiter
- type DeletePrm
- type DeleteRes
- type ExistsPrm
- type ExistsRes
- type GetPrm
- type GetRangePrm
- type GetRangeRes
- type GetRes
- type IteratePrm
- type IterateRes
- type IterationElement
- type IterationHandler
- type MetaStorage
- type PutPrm
- type PutRes
- type RebuildPrm
- type RebuildRes
- type Storage
Constants ¶
This section is empty.
Variables ¶
var ErrNoSpace = logicerr.New("no free space")
ErrNoSpace MUST be returned when there is no space to put an object on the device.
var ErrReadOnly = logicerr.New("opened as read-only")
ErrReadOnly MUST be returned for modifying operations when the storage was opened in readonly mode.
Functions ¶
This section is empty.
Types ¶
type ConcurrentWorkersLimiter ¶ added in v0.38.0
type ExistsRes ¶
type ExistsRes struct {
Exists bool
}
ExistsRes groups the resulting values of Exists operation.
type GetRangePrm ¶
type GetRangeRes ¶
type GetRangeRes struct {
Data []byte
}
type IteratePrm ¶
type IteratePrm struct { Handler IterationHandler IgnoreErrors bool }
IteratePrm groups the parameters of Iterate operation.
type IterateRes ¶
type IterateRes struct{}
IterateRes groups the resulting values of Iterate operation.
type IterationElement ¶
IterationElement represents a unit of elements through which Iterate operation passes.
type IterationHandler ¶
type IterationHandler func(IterationElement) error
IterationHandler is a generic processor of IterationElement.
type MetaStorage ¶ added in v0.38.0
type PutPrm ¶
type PutPrm struct { Address oid.Address Object *objectSDK.Object RawData []byte DontCompress bool }
PutPrm groups the parameters of Put operation.
type PutRes ¶
type PutRes struct {
StorageID []byte
}
PutRes groups the resulting values of Put operation.
type RebuildPrm ¶ added in v0.38.0
type RebuildPrm struct { MetaStorage MetaStorage WorkerLimiter ConcurrentWorkersLimiter }
type RebuildRes ¶ added in v0.38.0
type Storage ¶
type Storage interface { Open(readOnly bool) error Init() error Close() error Type() string Path() string ObjectsCount(ctx context.Context) (uint64, error) SetCompressor(cc *compression.Config) Compressor() *compression.Config // SetReportErrorFunc allows to provide a function to be called on disk errors. // This function MUST be called before Open. SetReportErrorFunc(f func(string, error)) SetParentID(parentID string) Get(context.Context, GetPrm) (GetRes, error) GetRange(context.Context, GetRangePrm) (GetRangeRes, error) Exists(context.Context, ExistsPrm) (ExistsRes, error) Put(context.Context, PutPrm) (PutRes, error) Delete(context.Context, DeletePrm) (DeleteRes, error) Iterate(context.Context, IteratePrm) (IterateRes, error) Rebuild(context.Context, RebuildPrm) (RebuildRes, error) }
Storage represents key-value object storage. It is used as a building block for a blobstor of a shard.