package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev

# Functions

AdmissionToRaftPriority maps the larger set of values in admissionpb.WorkPriority to the smaller set of raftpb.Priority.
NewLogTracker returns a LogTracker initialized to the given log mark.
NewSendTokenWatcher creates a new SendTokenWatcher.
NewStreamTokenCounterProvider creates a new StreamTokenCounterProvider.
NewWaitForEvalConfig constructs WaitForEvalConfig.
RaftEventFromMsgStorageAppendAndMsgApps constructs a RaftEvent from the given raft MsgStorageAppend message, and outboundMsgs.
RaftToAdmissionPriority maps a raftpb.Priority to the lowest admissionpb.WorkPriority that could map to it.
WaitForEval waits for a quorum of handles to be signaled and have tokens available, including all the required wait handles.
WorkClassFromRaftPriority maps a raftpb.Priority to the kinds of flow tokens needed.

# Constants

AdjDisconnect is set when (regular|elastic) tokens are being returned without corresponding admission.
AdjForceFlush is set when elastic send tokens are being deducted without waiting for them to be available, due to force flush.
AdjPreventSendQueue is set when not enough (regular|elastic) send tokens are available but being deducted anyway (negative balance) to prevent a delay in quorum by forming a send queue.
ConfigRefreshWaitSignaled indicates that the config refresh channel was signaled.
ContextCanceled indicates that the context was canceled.
MsgAppPull is the way in which Raft operates when the RangeController is using send tokens to pace sending of work to a follower.
MsgAppPush is the classic way in which Raft operates, where the Ready includes MsgApps for followers.
NoReplicaID is a special value of roachpb.ReplicaID, which can never be a valid ID.
ReplicaRefreshWaitSignaled indicates that the replica refresh channel was signaled.
WaitSuccess indicates that the required quorum and required wait handles were signaled and had tokens available.

# Structs

AdmittedVector contains admitted log indices for each priority.
LogTracker tracks the durable and logically admitted state of a raft log.
RaftEvent carries a RACv2-relevant subset of raft state sent to storage.
RangeControllerInitState is the initial state at the time of creation.
RangeSendStreamStats contains the stats for the replica send streams that belong to a range.
ReplicaMutexAsserter must only be used to assert that mutexes are held.
ReplicaSendQueueStats contains the size and count of the send stream queue for a replica.
ReplicaSendStreamStats contains the stats for a replica send stream that may be used to inform placement decisions pertaining to the replica.
SendTokenWatcher can be used for watching and waiting on available elastic send tokens.
SendTokenWatcherHandle is a unique handle that is watching for available elastic send tokens on a stream.
StreamTokenCounterProvider is the interface for retrieving token counters for a given stream.
Tracker tracks flow token deductions for a replicaSendStream.
WaitForEvalConfig provides the latest configuration related to WaitForEval.

# Interfaces

MsgAppSender is used to send a MsgApp in pull mode.
ProbeToCloseTimerScheduler is an interface for scheduling the closing of a replica send stream.
RaftInterface implements methods needed by RangeController.
RangeController provides flow control for replication traffic in KV, for a range at the leader.
Scheduler abstracts the raftScheduler to allow the RangeController to schedule its own internal processing.
TokenGrantNotification is an interface that is called when tokens are available.

# Type aliases

LogMark is a position in a log consistent with the leader at a specific term.
RaftMsgAppMode specifies how Raft (at the leader) generates MsgApps.
RangeSendQueueStats contains the stats for the replica send queues that belong to a range.
ReplicaSet is a map, unlike roachpb.ReplicaSet, for convenient lookup by ReplicaID.
TokenAdjustFlag are used to inform token adjustments about the context in which they are being made.
TokenType represents the type of token being adjusted, distinct from the class of token (elastic or regular).
WaitEndState is the state returned by WaitForEval and indicates the result of waiting.
WaitForEvalCategory specifies what category of work is subject to waiting in WaitForEval.