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 IterateShards ¶
func IterateShards(c *Storage, required bool, f func(details *shardconfig.ShardDetails) 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.
Types ¶
type Storage ¶ added in v0.46.0
type Storage struct {
ShardROErrorThreshold int `mapstructure:"shard_ro_error_threshold"`
IgnoreUninitedShards bool `mapstructure:"ignore_uninited_shards"`
Default shardconfig.ShardDetails `mapstructure:"shard_defaults"`
ShardList []shardconfig.ShardDetails `mapstructure:"shards"`
}
Storage contains configuration for the storage engine.
Click to show internal directories.
Click to hide internal directories.