package
2.0.8+incompatible
Repository: https://github.com/etherzero-org/go-etherzero.git
Documentation: pkg.go.dev

# Functions

FluzCapacitorAlgorithm works by narrowing the epoch search area if an update is found going back and forth in time First, it will attempt to find an update where it should be now if the hint was really the last update.
GetFirstEpoch returns the epoch where the first update should be located based on what time it is now.
GetNextEpoch returns the epoch where the next update should be located according to where the previous update was and what time it is now.
GetNextLevel returns the frequency level a next update should be placed at, provided where the last update was and what time it is now.
Hint creates a hint based only on the last known update time.

# Constants

DefaultLevel sets what level will be chosen to search when there is no hint.
EpochLength stores the serialized binary length of an Epoch.
default is 25 (~1 year).
default is 0 (1 second).
MaxTime contains the highest possible time value an Epoch can handle.

# Variables

Lookup finds the update with the highest timestamp that is smaller or equal than 'now' It takes a hint which should be the epoch where the last known update was If you don't know in what epoch the last update happened, simply submit lookup.NoClue read() will be called on each lookup attempt Returns an error only if read() returns an error Returns nil if an update was not found.
NoClue is a hint that can be provided when the Lookup caller does not have a clue about where the last update may be.

# Structs

Epoch represents a time slot at a particular frequency level.

# Type aliases

Algorithm is the function signature of a lookup algorithm.
EpochID is a unique identifier for an Epoch, based on its level and base time.
ReadFunc is a handler called by Lookup each time it attempts to find a value It should return <nil> if a value is not found It should return <nil> if a value is found, but its timestamp is higher than "now" It should only return an error in case the handler wants to stop the lookup process entirely.