reg

package
v0.9.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2021 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package reg provides the gRPC network service implementation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Registrator

type Registrator struct {
	Networkd *networkd.Networkd
	Conn     *rtnetlink.Conn
}

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

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