package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
CreateTestStorePool creates a stopper, gossip and storePool for use in tests.
MakeStoreList constructs a new store list based on the passed in descriptors.
MakeStorePoolNodeLivenessFunc returns a function which determines the status of a node based on information provided by the specified NodeLiveness.
NewMockNodeLiveness constructs a MockNodeLiveness, for testing purposes.
NewOverrideStorePool constructs an OverrideStorePool that can use its own view of node liveness while falling through to an underlying store pool for the state of peer stores.
NewStorePool creates a StorePool and registers the store updating callback with gossip.
OverrideNodeCountFunc constructs a NodeCountFunc based on a set of predefined overrides.
OverrideNodeLivenessFunc constructs a NodeLivenessFunc based on a set of predefined overrides.
# Constants
StoreFilterNone requests that the storeList include all live stores.
StoreFilterSuspect requests that the returned store list additionally exclude stores that have been suspected as unhealthy.
StoreFilterThrottled requests that the returned store list additionally exclude stores that have been throttled for declining a snapshot.
ThrottleFailed is used when we're throttling as a result of a failed operation.
# Variables
FailedReservationsTimeout specifies a duration during which the local replicate queue will not consider stores which have failed a reservation a viable target.
# Structs
MockNodeLiveness is a testing construct to mock what node liveness status a store pool observes for a given node.
OverrideStorePool is an implementation of AllocatorStorePool that allows the ability to override a node's liveness status for the purposes of evaluation for the allocator, otherwise delegating to an actual StorePool for all its logic, including management and lookup of store descriptors.
Stat provides a running sample size and running stats.
StoreDetail groups together store-relevant details.
StoreList holds a list of store descriptors and associated count and used stats for those stores.
StorePool maintains a list of all known stores in the cluster and information on their health.
# Interfaces
AllocatorStorePool provides an interface for use by the allocator to a list of all known stores in the cluster and information on their health.
# Type aliases
CapacityChangeFn is a function which may be called on capacity changes, by the storepool.
The NodeCountFunc returns a count of the total number of nodes the user intends for their to be in the cluster.
A NodeLivenessFunc accepts a node ID and current time and returns whether or not the node is live.
StoreFilter is one of StoreFilter{None,Throttled,Suspect}, controlling what stores are excluded from the storeList.
ThrottledStoreReasons is the set of reasons why stores have been throttled.
ThrottleReason encodes the reason for throttling a given store.