# Functions
AttachAvailableFunc attaches a customize function for the container.
DiffResourceKeyInfo return the difference of key info between two CachedResource.
DiffResourcePeersInfo return the difference of peers info between two CachedResource.
DistinctScore returns the score that the other is distinct from the containers.
EncodeToString overrides hex.EncodeToString implementation.
HexResourceKey converts resource key to hex format.
HexResourceKeyStr converts resource key to hex format.
MergeTestResources merge a set of CachedResource by resourceKey.
NewBasicCluster creates a BasicCluster.
NewCachedContainer creates CachedContainer with meta data.
NewCachedContainers create a CachedContainer with map of containerID to CachedContainer.
NewCachedResource creates CachedResource with resource's meta and leader peer.
NewCachedResources creates CachedResources with tree, resources, leaders and followers.
NewKeyRange create a KeyRange with the given start key and end key.
NewScheduleKind creates a schedule kind with resource kind and schedule policy.
NewTestCachedContainerWithSizeCount is create a container with size and count.
NewTestCachedResource creates a CachedResource for test.
NewTestContainerInfoWithLabel is create a container with specified labels.
OfflineContainer offline a container.
PauseLeaderTransfer prevents the container from been selected as source or target container of TransferLeader.
ResourceFromHeartbeat constructs a Resource from resource heartbeat.
ResourcesToHexMeta converts resources' meta keys to hex format.
ResourceToHexMeta converts a resource meta's keys to hex format.
ResumeLeaderTransfer cleans a container's pause state.
SetApproximateKeys sets the approximate keys for the resource.
SetApproximateSize sets the approximate size for the resource.
SetContainerAddress sets the address for the container.
SetContainerDeployPath sets the deploy path for the container.
SetContainerLabels sets the labels for the container.
SetContainerStartTime sets the start timestamp for the container.
SetContainerState sets the state for the container.
SetContainerStats sets the statistics information for the container.
SetContainerVersion sets the version for the container.
SetLastHeartbeatTS sets the time of last heartbeat for the container.
SetLastPersistTime updates the time of last persistent.
SetLeaderCount sets the leader count for the container.
SetLeaderSize sets the leader size for the container.
SetLeaderWeight sets the leader weight for the container.
SetNewContainerStats sets the raw statistics information for the container.
SetPeers sets the peers for the resource.
SetPendingPeerCount sets the pending peer count for the container.
SetReadBytes sets the read bytes for the resource.
SetReadKeys sets the read keys for the resource.
SetReportInterval sets the report interval for the resource.
SetResourceConfVer sets the config version for the resource.
SetResourceCount sets the Resource count for the container.
SetResourceSize sets the Resource size for the container.
SetResourceVersion sets the version for the resource.
SetResourceWeight sets the Resource weight for the container.
SetWrittenBytes sets the written bytes for the resource.
SetWrittenKeys sets the written keys for the resource.
SortedPeersEqual judges whether two sorted `peerSlice` are equal.
SortedPeersStatsEqual judges whether two sorted `peerStatsSlice` are equal.
SplitTestResources split a set of CachedResource by the middle of resourceKey.
String converts slice of bytes to string without copy.
StringToKeyType creates a key type with string.
StringToSchedulePolicy creates a schedule policy with string.
TombstoneContainer set a container to tombstone.
ToUpperASCIIInplace bytes.ToUpper but zero-cost.
UpContainer up a container.
WithAddPeer adds a peer for the resource.
WithDecConfVer decreases the config version of the resource.
WithDecVersion decreases the version of the resource.
WithDownPeers sets the down peers for the resource.
WithEndKey sets the end key for the resource.
WithIncConfVer increases the config version of the resource.
WithIncVersion increases the version of the resource.
WithInterval sets the interval.
WithLeader sets the leader for the resource.
WithLearners sets the learners for the resource.
WithNewPeerIds sets new ids for peers.
WithNewResourceID sets new id for the resource.
WithPendingPeers sets the pending peers for the resource.
WithPromoteLearner promotes the learner.
WithRemoveContainerPeer removes the specified peer for the resource.
WithReplacePeerContainer replaces a peer's containerID with another ID.
WithStartKey sets the start key for the resource.
WithState sets state for the resource.
# Constants
ByCount indicates that balance by count.
BySize indicates that balance by size.
EmptyResourceApproximateSize is the resource approximate size of an empty resource (heartbeat size <= 1MB).
Built-in priority level.
ImpossibleFlowSize is an impossible flow size (such as written_bytes, read_keys, etc.) It may be caused by overflow, refer to https://github.com/tikv/pd/issues/3379.
Built-in priority level.
Built-in priority level.
Raw indicates that the key is raw key.
Table indicates that the key is table key.
Txn indicates that the key is txn key.
# Structs
BasicCluster provides basic data member and interface for a storage application cluster.
CachedContainer is the container runtime info cached in the cache.
CachedContainers contains information about all container.
CachedResource resource runtime info cached in the cache.
CachedResources for export.
HexResourceMeta is a resource meta in the hex format.
KeyRange is a key range.
ScheduleKind distinguishes resources and schedule policy.
# Interfaces
ContainerSetController is used to control containers' status.
ContainerSetInformer provides access to a shared informer of containers.
ResourceSetInformer provides access to a shared informer of resources.
# Type aliases
ContainerCreateOption is used to create container.
HexResourcesMeta is a slice of resources' meta in the hex format.
KeyType distinguishes different kinds of key types.
PriorityLevel lower level means higher priority.
ResourceCreateOption used to create resource.
ResourceOption is used to select resource.
SchedulePolicy distinguishes different kinds of schedule policies.