shardconfig

package
v0.0.0-...-79ba347 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const SmallSizeLimitDefault = 1 << 20

SmallSizeLimitDefault is a default limit of small objects payload in bytes.

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) 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) 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