Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct {
Constraints []*Constraint
}
Config is consist of a list of constraints.
func ParseConfig ¶
ParseConfig parses a user configuration string.
type Constraint ¶
type Constraint struct { Function string // One of "count", "label_values", "count_leader", "isolation_level". Filters []Filter // "key:value" formed parameters. Labels []string // "key" formed parameters. Op string // One of "<", "<=", "=", ">=", ">". Value int // Expected expression evaluate value. }
Constraint represents a user-defined region placement rule. Each constraint is configured as an expression, for example 'count(zone:z1,rack:r1,host)>=3'.
Click to show internal directories.
Click to hide internal directories.