reg

package
v0.9.0-alpha.4 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2021 License: MPL-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registrator

type Registrator struct {
	Timed *ntp.NTP
}

Registrator is the concrete type that implements the factory.Registrator and timeapi.Init interfaces.

func NewRegistrator

func NewRegistrator(n *ntp.NTP) *Registrator

NewRegistrator builds new Registrator instance.

func (*Registrator) Check added in v0.6.0

func (r *Registrator) Check(ctx context.Context, in *empty.Empty) (reply *healthapi.HealthCheckResponse, err error)

Check implements the Health api and provides visibilty into the state of timed.

func (*Registrator) Ready added in v0.6.0

func (r *Registrator) Ready(ctx context.Context, in *empty.Empty) (reply *healthapi.ReadyCheckResponse, err error)

Ready implements the Health api and provides visibility to the state of timed. Ready signifies the initial time sync finished successfully. Not Ready signifies that the initial time sync still needs to happen.

func (*Registrator) Register

func (r *Registrator) Register(s *grpc.Server)

Register implements the factory.Registrator interface.

func (*Registrator) Time

func (r *Registrator) Time(ctx context.Context, in *empty.Empty) (reply *timeapi.TimeResponse, err error)

Time issues a query to the configured ntp server and displays the results.

func (*Registrator) TimeCheck

func (r *Registrator) TimeCheck(ctx context.Context, in *timeapi.TimeRequest) (reply *timeapi.TimeResponse, err error)

TimeCheck issues a query to the specified ntp server and displays the results.

func (*Registrator) Watch added in v0.6.0

Watch implements the Health api and provides visibilty into the state of networkd. Ready signifies the daemon (api) is healthy and ready to serve requests.

Jump to

Keyboard shortcuts

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