engineconfig

package
v0.46.14 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoShardConfigured = errors.New("no shard configured")

ErrNoShardConfigured is returned when at least 1 shard is required but none are found.

Functions

func DisableShardOnMetaLoss added in v0.46.12

func DisableShardOnMetaLoss(c *config.Config) bool

DisableShardOnMetaLoss returns value of "disable_shard_on_meta_loss" from "storage" section.

func EngineLowMemoryConsumption added in v0.37.0

func EngineLowMemoryConsumption(c *config.Config) bool

EngineLowMemoryConsumption returns value of "lowmem" config parmeter from "storage" section.

func IterateShards

func IterateShards(c *config.Config, required bool, f func(*shardconfig.Config) error) error

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

func ShardErrorThreshold(c *config.Config) uint32

ShardErrorThreshold returns the value of "shard_ro_error_threshold" config parameter from "storage" section.

Returns 0 if the the value is missing.

Types

This section is empty.

Jump to

Keyboard shortcuts

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