fstree

package
v0.45.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 27, 2025 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DepthDefault is the default shallow dir depth.
	DepthDefault = 4
	// CombinedCountLimitDefault is the default for the maximum number of objects to write into a single file.
	CombinedCountLimitDefault = 128
	// CombinedSizeLimitDefault is the default for the maximum size of the combined object file.
	CombinedSizeLimitDefault = 8 * 1024 * 1024
	// CombinedSizeThresholdDefault is the default for the minimal size of the object that won't be combined with others for writes.
	CombinedSizeThresholdDefault = 128 * 1024
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config config.Config

Config is a wrapper over the config section which provides access to FSTree configurations.

func From

func From(c *config.Config) *Config

From wraps config section into Config.

func (*Config) CombinedCountLimit added in v0.44.0

func (x *Config) CombinedCountLimit() int

CombinedCountLimit returns the value of "combined_count_limit" config parameter.

Returns CombinedCountLimitDefault if the value is missing or not a positive integer.

func (*Config) CombinedSizeLimit added in v0.44.0

func (x *Config) CombinedSizeLimit() int

CombinedSizeLimit returns the value of "combined_size_limit" config parameter.

Returns CombinedSizeLimitDefault if the value is missing, equal to 0 or not a proper size specification.

func (*Config) CombinedSizeThreshold added in v0.44.0

func (x *Config) CombinedSizeThreshold() int

CombinedSizeThreshold returns the value of "combined_size_threshold" config parameter.

Returns CombinedSizeThresholdDefault if the value is missing, equal to 0 or not a proper size specification.

func (*Config) Depth

func (x *Config) Depth() uint64

Depth returns the value of "depth" config parameter.

Returns DepthDefault if the value is out of [1:fstree.MaxDepth] range.

func (*Config) NoSync added in v0.36.0

func (x *Config) NoSync() bool

NoSync returns the value of "no_sync" config parameter.

Returns false if the value is not a boolean or is missing.

func (*Config) Type

func (x *Config) Type() string

Type returns the storage type.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL