package
0.0.1
Repository: https://github.com/libonomy/libonomy-p2p.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

CheckMessageDrift checks if a given message timestamp is too far from our local clock.
CheckSystemClockDrift is comparing our clock to the collected ntp data return the drift and an error when drift reading failed or exceeds our preset MaxAllowedDrift.
NewClock return TimeClock struct that notifies tickInterval has passed.
NewTicker returns a new instance of ticker.

# Constants

DefaultNtpPort is the ntp protocol port.
MaxAllowedMessageDrift is the time we limit we receive and handle delivered messages within.
MaxRequestTries is the number of tries we try to query ntp before we give up when having errors.
MinResultsThreshold is the minimum number of successful ntp query results to calculate the drift.
NtpOffset is 70 years in seconds since ntp counts from 1900 and unix from 1970.
RequestTriesInterval is the interval to wait between tries to ask ntp for the time.

# Variables

DefaultServer is a list of relay on more than one server.

# Structs

LayerConv is a converter between time to layer ID struct.
NtpPacket is a 48 bytes packet used for querying ntp information.
RealClock is the struct wrapping a local time struct.
Ticker is the struct responsible for notifying that a layer has been ticked to subscribers.
TimeClock is the struct holding a real clock.

# Interfaces

Clock defines the functionality needed from any clock type.
LayerConverter provides conversions from time to layer and vice versa.