constant

package
v1.1.0-beta.0...-ac4e640 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Direction

type Direction int

Direction distinguishes different kinds of direction.

const (
	// In indicates that the direction is in.
	In Direction = iota
	// Out indicates that the direction is out.
	Out
)

func (Direction) String

func (d Direction) String() string

type KeyType

type KeyType int

KeyType distinguishes different kinds of key types

const (
	// Table indicates that the key is table key
	Table KeyType = iota
	// Raw indicates that the key is raw key.
	Raw
	// Txn indicates that the key is txn key.
	Txn
)

func StringToKeyType

func StringToKeyType(input string) KeyType

StringToKeyType creates a key type with string.

func (KeyType) String

func (k KeyType) String() 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

Jump to

Keyboard shortcuts

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