Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetTimeFromRoughtime ¶
func GetTimeFromRoughtime(servers []RoughtimeServer) (time.Time, error)
GetTimeFromRoughtime queries the given Roughtime servers for the current time. It returns the mean time reported by the servers, or the local time if no servers could be queried successfully.
Types ¶
type RoughtimeServer ¶
type RoughtimeServer struct { // Protocol is the network protocol to use (e.g., "udp", "tcp"). Protocol string // Address is the network address of the Roughtime server. Address string // PublicKey is the base64-encoded public key of the Roughtime server. PublicKey string // PublicKeyType is the type of the public key (e.g., "ed25519"). PublicKeyType string }
RoughtimeServer represents a Roughtime server configuration.
Click to show internal directories.
Click to hide internal directories.