Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KeyType ¶
type KeyType int
KeyType distinguishes different kinds of key types
func StringToKeyType ¶
StringToKeyType creates a key type with string.
type PriorityLevel ¶
type PriorityLevel int
PriorityLevel lower level means higher priority
const ( Low PriorityLevel = iota Medium High Urgent PriorityLevelLen )
Built-in priority level
func (PriorityLevel) String ¶
func (p PriorityLevel) String() string
type ResourceKind ¶
type ResourceKind int
ResourceKind distinguishes different kinds of resources.
const ( // LeaderKind indicates the leader kind resource LeaderKind ResourceKind = iota // RegionKind indicates the region kind resource RegionKind // WitnessKind indicates the witness kind resource WitnessKind // ResourceKindLen represents the ResourceKind count ResourceKindLen )
func (ResourceKind) String ¶
func (k ResourceKind) String() string
type ScheduleKind ¶
type ScheduleKind struct { Resource ResourceKind Policy SchedulePolicy }
ScheduleKind distinguishes resources and schedule policy.
func NewScheduleKind ¶
func NewScheduleKind(resource ResourceKind, policy SchedulePolicy) ScheduleKind
NewScheduleKind creates a schedule kind with resource kind and schedule policy.
type SchedulePolicy ¶
type SchedulePolicy int
SchedulePolicy distinguishes different kinds of schedule policies.
const ( // ByCount indicates that balance by count ByCount SchedulePolicy = iota // BySize indicates that balance by size BySize )
func StringToSchedulePolicy ¶
func StringToSchedulePolicy(input string) SchedulePolicy
StringToSchedulePolicy creates a schedule policy with string.
func (SchedulePolicy) String ¶
func (k SchedulePolicy) String() string
Click to show internal directories.
Click to hide internal directories.