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

# Functions

MakeQueryState creates an initialized QueryState.
NewOracleFactory creates an oracle with the given policy.
RegisterPolicy creates a new policy given a function which constructs an OracleFactory.

# Variables

BinPackingChoice bin-packs the choices.
ClosestChoice chooses the node closest to the current node.
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.

# Interfaces

Oracle is used to choose the lease holder for ranges.
OracleFactory creates an oracle for a Txn.

# Type aliases

OracleFactoryFunc creates an OracleFactory from a Config.
Policy determines how an Oracle should select a replica.