Documentation ¶
Index ¶
- type DeletePrm
- type DeleteRes
- type ExistsPrm
- type ExistsRes
- type GetPrm
- type GetRes
- type HeadPrm
- type HeadRes
- type ID
- type Info
- type InhumePrm
- type InhumeRes
- type Mode
- type Option
- type PutPrm
- type PutRes
- type RngPrm
- type RngRes
- type SelectPrm
- type SelectRes
- type Shard
- func (s *Shard) Close() error
- func (s *Shard) Delete(prm *DeletePrm) (*DeleteRes, error)
- func (s *Shard) DumpInfo() Info
- func (s *Shard) Exists(prm *ExistsPrm) (*ExistsRes, error)
- func (s *Shard) Get(prm *GetPrm) (*GetRes, error)
- func (s *Shard) GetRange(prm *RngPrm) (*RngRes, error)
- func (s *Shard) Head(prm *HeadPrm) (*HeadRes, error)
- func (s *Shard) ID() *ID
- func (s *Shard) Inhume(prm *InhumePrm) (*InhumeRes, error)
- func (s *Shard) Init() error
- func (s *Shard) List() (*SelectRes, error)
- func (s *Shard) Open() error
- func (s *Shard) Put(prm *PutPrm) (*PutRes, error)
- func (s *Shard) Select(prm *SelectPrm) (*SelectRes, error)
- func (s *Shard) SetMode(m Mode) error
- func (s *Shard) ToMoveIt(prm *ToMoveItPrm) (*ToMoveItRes, error)
- func (s *Shard) WeightValues() WeightValues
- type ToMoveItPrm
- type ToMoveItRes
- type WeightValues
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DeletePrm ¶
type DeletePrm struct {
// contains filtered or unexported fields
}
DeletePrm groups the parameters of Delete operation.
type ExistsPrm ¶
type ExistsPrm struct {
// contains filtered or unexported fields
}
ExistsPrm groups the parameters of Exists operation.
type ExistsRes ¶
type ExistsRes struct {
// contains filtered or unexported fields
}
ExistsRes groups resulting values of Exists operation.
type GetPrm ¶
type GetPrm struct {
// contains filtered or unexported fields
}
GetPrm groups the parameters of Get operation.
type GetRes ¶
type GetRes struct {
// contains filtered or unexported fields
}
GetRes groups resulting values of Get operation.
type HeadPrm ¶
type HeadPrm struct {
// contains filtered or unexported fields
}
HeadPrm groups the parameters of Head operation.
func (*HeadPrm) WithAddress ¶
WithAddress is a Head option to set the address of the requested object.
Option is required.
type HeadRes ¶
type HeadRes struct {
// contains filtered or unexported fields
}
HeadRes groups resulting values of Head operation.
type ID ¶
type ID []byte
ID represents Shard identifier.
Each shard should have the unique ID within a single instance of local storage.
func NewIDFromBytes ¶
NewIDFromBytes constructs ID from byte slice.
type Info ¶
type Info struct { // Identifier of the shard. ID *ID // Information about the metabase. MetaBaseInfo meta.Info // Information about the BLOB storage. BlobStorInfo blobstor.Info // Information about the Write Cache. WriteCacheInfo blobstor.Info // Weight parameters of the shard. WeightValues WeightValues }
Info groups the information about Shard.
type InhumePrm ¶
type InhumePrm struct {
// contains filtered or unexported fields
}
InhumePrm encapsulates parameters for inhume operation.
type Mode ¶
type Mode uint32
Mode represents enumeration of Shard work modes.
const ( // ModeActive is a Mode value for active shard. ModeActive Mode // ModeInactive is a Mode value for inactive shard. ModeInactive // ModeReadOnly is a Mode value for read-only shard. ModeReadOnly // ModeFault is a Mode value for faulty shard. ModeFault // ModeEvacuate is a Mode value for evacuating shard. ModeEvacuate )
type Option ¶
type Option func(*cfg)
Option represents Shard's constructor option.
func WithBlobStorOptions ¶
WithBlobStorOptions returns option to set internal BlobStor options.
func WithLogger ¶
WithLogger returns option to set Shard's logger.
func WithMetaBaseOptions ¶
WithMetaBaseOptions returns option to set internal metabase options.
func WithWriteCache ¶
WithWriteCache returns option to toggle write cache usage.
func WithWriteCacheOptions ¶
WithMetaBaseOptions returns option to set internal metabase options.
type PutPrm ¶
type PutPrm struct {
// contains filtered or unexported fields
}
PutPrm groups the parameters of Put operation.
type RngPrm ¶
type RngPrm struct {
// contains filtered or unexported fields
}
RngPrm groups the parameters of GetRange operation.
func (*RngPrm) WithAddress ¶
WithAddress is a Rng option to set the address of the requested object.
Option is required.
type RngRes ¶
type RngRes struct {
// contains filtered or unexported fields
}
RngPrm groups resulting values of GetRange operation.
type SelectPrm ¶
type SelectPrm struct {
// contains filtered or unexported fields
}
SelectPrm groups the parameters of Select operation.
func (*SelectPrm) WithContainerID ¶
WithContainerID is a Select option to set the container id to search in.
func (*SelectPrm) WithFilters ¶
func (p *SelectPrm) WithFilters(fs objectSDK.SearchFilters) *SelectPrm
WithFilters is a Select option to set the object filters.
type SelectRes ¶
type SelectRes struct {
// contains filtered or unexported fields
}
SelectRes groups resulting values of Select operation.
func (*SelectRes) AddressList ¶
AddressList returns list of addresses of the selected objects.
type Shard ¶
type Shard struct {
// contains filtered or unexported fields
}
Shard represents single shard of NeoFS Local Storage Engine.
func (*Shard) Exists ¶
Exists checks if object is presented in shard.
Returns any error encountered that does not allow to unambiguously determine the presence of an object.
func (*Shard) Get ¶
Get reads an object from shard.
Returns any error encountered that did not allow to completely read the object part.
Returns object.ErrNotFound if requested object is missing in shard.
func (*Shard) GetRange ¶
GetRange reads part of an object from shard.
Returns any error encountered that did not allow to completely read the object part.
Returns ErrRangeOutOfBounds if requested object range is out of bounds.
func (*Shard) Inhume ¶
Inhume calls metabase. Inhume method to mark object as removed. It won't be removed physically from blobStor and metabase until `Delete` operation.
func (*Shard) Put ¶
Put saves the object in shard.
Returns any error encountered that did not allow to completely save the object.
func (*Shard) Select ¶
Select selects the objects from shard that match select parameters.
Returns any error encountered that did not allow to completely select the objects.
func (*Shard) SetMode ¶
SetMode sets mode of the shard.
Returns any error encountered that did not allow to set shard mode.
func (*Shard) ToMoveIt ¶
func (s *Shard) ToMoveIt(prm *ToMoveItPrm) (*ToMoveItRes, error)
ToMoveIt calls metabase.ToMoveIt method to mark object as relocatable to another shard.
func (*Shard) WeightValues ¶
func (s *Shard) WeightValues() WeightValues
WeightValues returns current weight values of the Shard.
type ToMoveItPrm ¶
type ToMoveItPrm struct {
// contains filtered or unexported fields
}
ToMoveItPrm encapsulates parameters for ToMoveIt operation.
func (*ToMoveItPrm) WithAddress ¶
func (p *ToMoveItPrm) WithAddress(addr *objectSDK.Address) *ToMoveItPrm
WithAdderss sets object address that should be marked to move into another shard.
type ToMoveItRes ¶
type ToMoveItRes struct{}
ToMoveItRes encapsulates results of ToMoveIt operation.
type WeightValues ¶
type WeightValues struct { // Amount of free disk space. Measured in kilobytes. FreeSpace uint64 }
WeightValues groups values of Shard weight parameters.