shardconfig

package
v0.42.18 Latest Latest
Warning

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

Go to latest
Published: Dec 11, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SmallSizeLimitDefault is a default limit of small objects payload in bytes.
	SmallSizeLimitDefault                   = 1 << 20
	EstimateCompressibilityThresholdDefault = 0.1
	RefillMetabaseWorkersCountDefault       = 500
)

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

func From

func From(c *config.Config) *Config

From wraps config section into Config.

func (*Config) BlobStor

func (x *Config) BlobStor() *blobstorconfig.Config

BlobStor returns "blobstor" subsection as a blobstorconfig.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) EstimateCompressibility added in v0.38.0

func (x *Config) EstimateCompressibility() bool

EstimateCompressibility returns the value of "estimate_compressibility" config parameter.

Returns false if the value is not a valid bool.

func (*Config) EstimateCompressibilityThreshold added in v0.38.0

func (x *Config) EstimateCompressibilityThreshold() float64

EstimateCompressibilityThreshold returns the value of "estimate_compressibility_threshold" config parameter.

Returns EstimateCompressibilityThresholdDefault if the value is not defined, not valid float or not in range [0.0; 1.0].

func (*Config) GC

func (x *Config) GC() *gcconfig.Config

GC returns "gc" subsection as a gcconfig.Config.

func (*Config) Metabase

func (x *Config) Metabase() *metabaseconfig.Config

Metabase returns "metabase" subsection as a metabaseconfig.Config.

func (*Config) Mode

func (x *Config) Mode() (m mode.Mode)

Mode return the value of "mode" config parameter.

Panics if read the value is not one of predefined shard modes.

func (*Config) Pilorama

func (x *Config) Pilorama() *piloramaconfig.Config

Pilorama returns "pilorama" subsection as a piloramaconfig.Config.

func (*Config) RefillMetabase

func (x *Config) RefillMetabase() bool

RefillMetabase returns the value of "resync_metabase" config parameter.

Returns false if the value is not a valid bool.

func (*Config) RefillMetabaseWorkersCount added in v0.39.0

func (x *Config) RefillMetabaseWorkersCount() int

RefillMetabaseWorkersCount returns the value of "resync_metabase_worker_count" config parameter.

Returns RefillMetabaseWorkersCountDefault if the value is not a positive number.

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

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.

func (*Config) WriteCache

func (x *Config) WriteCache() *writecacheconfig.Config

WriteCache returns "writecache" subsection as a writecacheconfig.Config.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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