preflight

package
v1.92.1 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2023 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrClockOutOfSyncMajor = errs.Class("system clock is out of sync")

ErrClockOutOfSyncMajor is the error class for system clock is out of sync by more than 30m.

View Source
var ErrClockOutOfSyncMinor = errs.Class("system clock is off")

ErrClockOutOfSyncMinor is the error class for system clock is off by more than 10m.

Functions

This section is empty.

Types

type Config

type Config struct {
	LocalTimeCheck bool `` /* 180-byte string literal not displayed */
	DatabaseCheck  bool `help:"whether or not preflight check for database is enabled." default:"true"`
}

Config for preflight checks.

type LocalTime

type LocalTime struct {
	// contains filtered or unexported fields
}

LocalTime checks local system clock against all trusted satellites.

func NewLocalTime

func NewLocalTime(log *zap.Logger, config Config, trust *trust.Pool, dialer rpc.Dialer) *LocalTime

NewLocalTime creates a new localtime instance.

func (*LocalTime) Check

func (localTime *LocalTime) Check(ctx context.Context) (err error)

Check compares local system clock with all trusted satellites' system clock. it returns an error when local system clock is out of sync by more than 24h with all trusted satellites' clock.

Jump to

Keyboard shortcuts

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