reg

package
v0.3.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2020 License: MPL-2.0 Imports: 7 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 {
	Ntpd *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) 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

Jump to

Keyboard shortcuts

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