package
25.1.0+incompatible
Repository: https://github.com/cockroachdb/cockroach.git
Documentation: pkg.go.dev
# Functions
MakeQueryState creates an initialized QueryState.
NewOracle creates an oracle with the given policy.
RegisterPolicy creates a new policy given an OracleFactory.
# Variables
BinPackingChoice gives preference to leaseholders if possible, otherwise bin-packs the choices.
ClosestChoice chooses the node closest to the current node.
PreferFollowerChoice prefers choosing followers over leaseholders.
RandomChoice chooses lease replicas randomly.
# Structs
Config is used to construct an OracleFactory.
QueryState encapsulates the history of assignments of ranges to nodes done by an oracle on behalf of one particular query.
ReplicaDescriptorEx is a small extension of the roachpb.ReplicaDescriptor that also stores whether this replica info should be ignored for the purposes of misplanned ranges.
# Interfaces
Oracle is used to choose the lease holder for ranges.
# Type aliases
OracleFactory creates an oracle from a Config.
Policy determines how an Oracle should select a replica.