engineconfig

package
v0.44.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (

	// ShardPoolSizeDefault is a default value of routine pool size per-shard to
	// process object PUT operations in a storage engine.
	ShardPoolSizeDefault = 20
)

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 IgnoreUninitedShards added in v0.44.0

func IgnoreUninitedShards(c *config.Config) bool

IgnoreUninitedShards returns the value of "ignore_uninited_shards" config parameter from "storage" section.

Returns false if the value is missing.

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 ObjectPutRetryDeadline added in v0.44.0

func ObjectPutRetryDeadline(c *config.Config) time.Duration

ObjectPutRetryDeadline returns the value of "put_retry_deadline" config parameter from "storage" section.

Returns false if the value is missing.

func ShardErrorThreshold added in v0.28.0

func ShardErrorThreshold(c *config.Config) uint32

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

Returns 0 if the value is missing.

func ShardPoolSize added in v0.26.0

func ShardPoolSize(c *config.Config) uint32

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.

Directories

Path Synopsis
gc

Jump to

Keyboard shortcuts

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