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

# Packages

# Functions

NewCache creates a liveness cache.
NewKVStorage returns a Storage backed by the node liveness range.
NewNodeLiveness returns a new instance of NodeLiveness configured with the specified gossip instance.

# Constants

TestTimeUntilNodeDead is the test value for TimeUntilNodeDead to quickly mark stores as dead.
TestTimeUntilNodeDeadOff is the test value for TimeUntilNodeDead that prevents the store pool from marking stores as dead.

# Variables

ErrEpochAlreadyIncremented is returned by IncrementEpoch when someone else has already incremented the epoch to the desired value.
ErrEpochIncremented is returned when a heartbeat request fails because the underlying liveness record has had its epoch incremented.
ErrMissingRecord is returned when asking for liveness information about a node for which nothing is known.
ErrRecordCacheMiss is returned when asking for the liveness record of a given node and it is not found in the in-memory cache.
TimeAfterNodeSuspect measures how long we consider a store suspect since it's last failure.
TimeUntilNodeDead wraps "server.time_until_store_dead".

# Structs

Cache stores updates to both Liveness records and the store descriptor map.
LivenessUpdate contains the information for CPutting a new version of a liveness record.
Metrics holds metrics for use with node liveness activity.
NodeLiveness is a centralized failure detector that coordinates with the epoch-based range system to provide for leases of indefinite length (replacing frequent per-range lease renewals with heartbeats to the liveness system).
NodeLivenessOptions is the input to NewNodeLiveness.
Record is a liveness record that has been read from the database, together with its database encoding.

# Interfaces

Gossip is the subset of *gossip.Gossip used by liveness.
Storage is the subset of liveness that deals with reading and writing the liveness records to kv.

# Type aliases

HeartbeatCallback is invoked whenever this node updates its own liveness status, indicating that it is alive.
IsLiveCallback is invoked when a node's IsLive state changes to true.