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) 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) PutStream(addr oid.Address, handler func(*os.File) error) error
- func (t *FSTree) SetCompressor(cc *compression.Config)
- func (t *FSTree) SetReportErrorFunc(f func(string, error))
- func (*FSTree) Type() string
- type Info
- type Option
Constants ¶
View Source
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 )
View Source
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) 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) PutStream ¶ added in v0.28.0
PutStream puts executes handler on a file opened for write.
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)
func WithDirNameLen ¶ added in v0.32.0
func WithNoSync ¶ added in v0.36.0
Click to show internal directories.
Click to hide internal directories.