Documentation ¶
Index ¶
- type Registrator
- func (r *Registrator) Check(ctx context.Context, in *empty.Empty) (reply *healthapi.HealthCheckResponse, err error)
- func (r *Registrator) Ready(ctx context.Context, in *empty.Empty) (reply *healthapi.ReadyCheckResponse, err error)
- func (r *Registrator) Register(s *grpc.Server)
- func (r *Registrator) Time(ctx context.Context, in *empty.Empty) (reply *timeapi.TimeResponse, err error)
- func (r *Registrator) TimeCheck(ctx context.Context, in *timeapi.TimeRequest) (reply *timeapi.TimeResponse, err error)
- func (r *Registrator) Watch(in *healthapi.HealthWatchRequest, srv healthapi.Health_WatchServer) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Registrator ¶
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
func (r *Registrator) Watch(in *healthapi.HealthWatchRequest, srv healthapi.Health_WatchServer) error
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.