blobstorconfig

package
v0.25.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// PermDefault are default permission bits for BlobStor data.
	PermDefault = 0660

	// ShallowDepthDefault is a default shallow dir depth.
	ShallowDepthDefault = 4

	// SmallSizeLimitDefault is a default limit of small objects payload in bytes.
	SmallSizeLimitDefault = 1 << 20
)

config defaults

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 BlobStor configurations.

func From

func From(c *config.Config) *Config

From wraps config section into Config.

func (*Config) Blobovnicza

func (x *Config) Blobovnicza() *blobovniczaconfig.Config

Blobovnicza returns "blobovnicza" subsection as a blobovniczaconfig.Config.

func (*Config) Compress

func (x *Config) Compress() bool

Compress returns value of "compress" config parameter.

Returns false if value is not a valid bool.

func (*Config) Path

func (x *Config) Path() string

Path returns value of "path" config parameter.

Panics if value is not a non-empty string.

func (*Config) Perm

func (x *Config) Perm() fs.FileMode

Perm returns value of "perm" config parameter as a fs.FileMode.

Returns PermDefault if value is not a non-zero number.

func (*Config) ShallowDepth

func (x *Config) ShallowDepth() int

ShallowDepth returns value of "shallow_depth" config parameter.

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

func (*Config) SmallSizeLimit

func (x *Config) SmallSizeLimit() uint64

SmallSizeLimit returns value of "small_size_limit" config parameter.

Returns SmallSizeLimitDefault if value is not a positive number.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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