Documentation ¶
Index ¶
- Constants
- Variables
- func EngineLowMemoryConsumption(c *config.Config) bool
- func EngineRebuildWorkersCount(c *config.Config) uint32
- func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config) error) error
- func ShardErrorThreshold(c *config.Config) uint32
- func ShardPoolSize(c *config.Config) uint32
Constants ¶
const ( // ShardPoolSizeDefault is a default value of routine pool size per-shard to // process object PUT operations in a storage engine. ShardPoolSizeDefault = 20 // RebuildWorkersCountDefault is a default value of the workers count to // process storage rebuild operations in a storage engine. RebuildWorkersCountDefault = 100 )
Variables ¶
var ErrNoShardConfigured = errors.New("no shard configured")
ErrNoShardConfigured is returned when at least 1 shard is required but none are found.
Functions ¶
func EngineLowMemoryConsumption ¶ added in v0.37.0
EngineLowMemoryConsumption returns value of "lowmem" config parmeter from "storage" section.
func EngineRebuildWorkersCount ¶ added in v0.38.0
EngineRebuildWorkersCount returns value of "rebuild_workers_count" config parmeter from "storage" section.
func IterateShards ¶
IterateShards iterates over subsections of "shard" subsection of "storage" section of c, wrap them into shardconfig.Config and passes to f.
Section names are expected to be consecutive integer numbers, starting from 0.
Panics if N is not a positive number while shards are required.
func ShardErrorThreshold ¶
ShardErrorThreshold returns the value of "shard_ro_error_threshold" config parameter from "storage" section.
Returns 0 if the the value is missing.
func ShardPoolSize ¶
ShardPoolSize returns the value of "shard_pool_size" config parameter from "storage" section.
Returns ShardPoolSizeDefault if the value is not a positive number.
Types ¶
This section is empty.