blobstorconfig

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2022 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 the value of "compress" config parameter.

Returns false if the value is not a valid bool.

func (*Config) Path

func (x *Config) Path() string

Path returns the value of "path" config parameter.

Panics if the value is not a non-empty string.

func (*Config) Perm

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

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

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

func (*Config) ShallowDepth

func (x *Config) ShallowDepth() int

ShallowDepth returns the value of "depth" config parameter.

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

func (*Config) SmallSizeLimit

func (x *Config) SmallSizeLimit() uint64

SmallSizeLimit returns the value of "small_object_size" config parameter.

Returns SmallSizeLimitDefault if the value is not a positive number.

func (*Config) UncompressableContentTypes added in v0.27.4

func (x *Config) UncompressableContentTypes() []string

UncompressableContentTypes returns the value of "compress_skip_content_types" config parameter.

Returns nil if a the value is missing or is invalid.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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