entry

package
v0.2.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ElectionNumber

type ElectionNumber int64

ElectionNumber is a monotonically incrementing counter, starting with 0. the value -1 is special and signifies No elections (see NoElections)

const NoElections ElectionNumber = -1

NoElections indicates that no Elections have taken place.

type LeaderToken

type LeaderToken interface {
	CommitTS() time.Time
}

LeaderToken contains implementation-specific metadata about the existing values, returned by `WriteEntry`.

type RaceEntry

type RaceEntry struct {
	// Unique ID of the leader (possible or current)
	LeaderID string
	// HostPort is a slice of the system's unicast interface addresses to which clients should connect.
	HostPort []string
	// Expiration-time of the term this is an election for
	TermExpiry time.Time
	// Monotonically increasing Election/Generation-number
	ElectionNumber ElectionNumber

	// ConnectionParams should be used as a side-channel for
	// leader-election metadata for the legrpc package, e.g. we use it for
	// storing the GRPC ServiceConfig (or nothing).
	ConnectionParams []byte

	// Implementation-specific metadata about the existing values that
	// should be passed back when calling `WriteEntry`.
	Token LeaderToken
}

RaceEntry describes the contents of the file/row stored by the RaceDecider

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL