Documentation ¶
Overview ¶
Package reg provides the gRPC network service implementation.
Index ¶
- type Registrator
- func (r *Registrator) Check(ctx context.Context, in *empty.Empty) (reply *healthapi.HealthCheckResponse, err error)
- func (r *Registrator) Interfaces(ctx context.Context, in *empty.Empty) (reply *networkapi.InterfacesResponse, 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) Routes(ctx context.Context, in *empty.Empty) (reply *networkapi.RoutesResponse, err error)
- func (r *Registrator) Watch(in *healthapi.HealthWatchRequest, srv healthapi.Health_WatchServer) (err 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 networkapi.NetworkServer interfaces.
func NewRegistrator ¶
func NewRegistrator(n *networkd.Networkd) *Registrator
NewRegistrator builds new Registrator instance.
func (*Registrator) Check ¶ added in v0.4.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 networkd.
func (*Registrator) Interfaces ¶
func (r *Registrator) Interfaces(ctx context.Context, in *empty.Empty) (reply *networkapi.InterfacesResponse, err error)
Interfaces returns the hosts network interfaces and addresses.
func (*Registrator) Ready ¶ added in v0.4.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 networkd. Ready signifies the initial network configuration ( interfaces, routes, hostname, resolv.conf ) settings have been applied. Not Ready signifies that the initial network configuration still needs to happen.
func (*Registrator) Register ¶
func (r *Registrator) Register(s *grpc.Server)
Register implements the factory.Registrator interface.
func (*Registrator) Routes ¶
func (r *Registrator) Routes(ctx context.Context, in *empty.Empty) (reply *networkapi.RoutesResponse, err error)
Routes returns the hosts routing table.
func (*Registrator) Watch ¶ added in v0.4.0
func (r *Registrator) Watch(in *healthapi.HealthWatchRequest, srv healthapi.Health_WatchServer) (err 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.