blobovniczaconfig

package
v0.27.3 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2021 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SizeDefault is a default limit of estimates of Blobovnicza size.
	SizeDefault = 1 << 30

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

	// ShallowWidthDefault is a default shallow dir width.
	ShallowWidthDefault = 16

	// OpenedCacheSizeDefault is a default cache size of opened Blobovnicza's.
	OpenedCacheSizeDefault = 16
)

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

func From

func From(c *config.Config) *Config

From wraps config section into Config.

func (*Config) OpenedCacheSize

func (x *Config) OpenedCacheSize() int

OpenedCacheSize returns value of "opened_cache_capacity" config parameter.

Returns OpenedCacheSizeDefault if value is not a positive number.

func (*Config) ShallowDepth

func (x *Config) ShallowDepth() uint64

ShallowDepth returns value of "depth" config parameter.

Returns ShallowDepthDefault if value is not a positive number.

func (*Config) ShallowWidth

func (x *Config) ShallowWidth() uint64

ShallowWidth returns value of "width" config parameter.

Returns ShallowWidthDefault if value is not a positive number.

func (*Config) Size

func (x *Config) Size() uint64

Size returns value of "size" config parameter.

Returns SizeDefault if value is not a positive number.

Jump to

Keyboard shortcuts

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