Documentation ¶
Index ¶
- Constants
- type FSTree
- func (*FSTree) Close() error
- func (t *FSTree) Delete(prm common.DeletePrm) (common.DeleteRes, error)
- func (t *FSTree) Exists(prm common.ExistsPrm) (common.ExistsRes, error)
- func (t *FSTree) Get(prm common.GetPrm) (common.GetRes, error)
- func (t *FSTree) GetBytes(addr oid.Address) ([]byte, error)
- func (t *FSTree) GetRange(prm common.GetRangePrm) (common.GetRangeRes, error)
- func (t *FSTree) Init() error
- func (t *FSTree) Iterate(prm common.IteratePrm) (common.IterateRes, error)
- func (t *FSTree) NumberOfObjects() (uint64, error)
- func (t *FSTree) Open(ro bool) error
- func (t *FSTree) Path() string
- func (t *FSTree) Put(prm common.PutPrm) (common.PutRes, error)
- func (t *FSTree) SetCompressor(cc *compression.Config)
- func (t *FSTree) SetReportErrorFunc(_ func(string, error))
- func (*FSTree) Type() string
- type Info
- type Option
Constants ¶
const ( // DirNameLen is how many bytes is used to group keys into directories. DirNameLen = 1 // in bytes // MaxDepth is maximum depth of nested directories. MaxDepth = (sha256.Size - 1) / DirNameLen )
const Type = "fstree"
Type is fstree storage type used in logs and configuration.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FSTree ¶
type FSTree struct { Info *compression.Config Depth uint64 DirNameLen int // contains filtered or unexported fields }
FSTree represents an object storage as a filesystem tree.
func (*FSTree) Exists ¶
Exists returns the path to the file with object contents if it exists in the storage and an error otherwise.
func (*FSTree) GetBytes ¶ added in v0.41.0
GetBytes reads object from the FSTree by address into memory buffer in a canonical NeoFS binary format. Returns apistatus.ObjectNotFound if object is missing.
func (*FSTree) GetRange ¶ added in v0.32.0
func (t *FSTree) GetRange(prm common.GetRangePrm) (common.GetRangeRes, error)
GetRange implements common.Storage.
func (*FSTree) Iterate ¶
func (t *FSTree) Iterate(prm common.IteratePrm) (common.IterateRes, error)
Iterate iterates over all stored objects.
func (*FSTree) NumberOfObjects ¶ added in v0.26.1
NumberOfObjects walks the file tree rooted at FSTree's root and returns number of stored objects.
func (*FSTree) SetCompressor ¶ added in v0.32.0
func (t *FSTree) SetCompressor(cc *compression.Config)
SetCompressor implements common.Storage.
func (*FSTree) SetReportErrorFunc ¶ added in v0.36.0
SetReportErrorFunc implements common.Storage.
type Info ¶
type Info struct { // Permission bits of the root directory. Permissions fs.FileMode // Full path to the root directory. RootPath string }
Info groups the information about file storage.
type Option ¶ added in v0.32.0
type Option func(*FSTree)