Documentation
¶
Index ¶
Constants ¶
View Source
const ( ISISAreaID = "49" ISISAreaNumber = "0000" ISISSystemIDPadding = "0000" ISISNSelector = "00" )
Variables ¶
View Source
var ( BuildInfo = prometheus.NewGaugeVec(prometheus.GaugeOpts{ Name: "controller_build_info", Help: "Build information of the agent", }, []string{"version", "commit", "date"}, ) )
View Source
var (
ErrServiceabilityRequired = errors.New("serviceability program client is required")
)
Functions ¶
This section is empty.
Types ¶
type Controller ¶
type Controller struct {
pb.UnimplementedControllerServer
// contains filtered or unexported fields
}
func NewController ¶
func NewController(options ...Option) (*Controller, error)
func (*Controller) GetConfig ¶
func (c *Controller) GetConfig(ctx context.Context, req *pb.ConfigRequest) (*pb.ConfigResponse, error)
GetConfig renders the latest device configuration based on cached device data
type Device ¶
type Interface ¶ added in v0.5.3
type Interface struct {
Name string
VlanId uint16
Ip netip.Prefix
NodeSegmentIdx uint16
IsSubInterface bool
IsSubInterfaceParent bool
InterfaceType InterfaceType
LoopbackType LoopbackType
Metric uint32
IsLink bool
}
func NewInterface ¶ added in v0.5.3
func NewInterface( name string, vlanId uint16, ip netip.Prefix, nodeSegmentIdx uint16, isSubInterface bool, isSubInterfaceParent bool, interfaceType InterfaceType, loopbackType LoopbackType, ) Interface
func (Interface) IsIpv4Loopback ¶ added in v0.5.3
func (Interface) IsLoopback ¶ added in v0.5.3
func (Interface) IsPhysical ¶ added in v0.5.3
func (Interface) IsVlanInterface ¶ added in v0.5.3
func (Interface) IsVpnv4Loopback ¶ added in v0.5.3
type InterfaceType ¶ added in v0.5.3
type InterfaceType uint8
const ( InterfaceTypeUnknown InterfaceType = iota InterfaceTypeLoopback InterfaceTypePhysical )
type LoopbackType ¶ added in v0.5.3
type LoopbackType uint8
const ( LoopbackTypeUnknown LoopbackType = iota LoopbackTypeVpnv4 LoopbackTypeIpv4 LoopbackTypePimRpAddr LoopbackTypeReserved )
type Option ¶
type Option func(*Controller)
func WithEnableInterfacesAndPeers ¶ added in v0.5.3
func WithEnableInterfacesAndPeers() Option
WithEnableInterfacesAndPeers provides a way to enable processing of device interfaces and BGP peers.
func WithListener ¶
WithListener provides a way to assign a custom listener for the gRPC server. If no listener is passed, the controller will listen on localhost.
func WithNoHardware ¶
func WithNoHardware() Option
WithNoHardware provides a way to exclude rendering config commands that will fail when not running on the real hardware.
func WithServiceabilityProgramClient ¶ added in v0.5.3
func WithServiceabilityProgramClient(s ServiceabilityProgramClient) Option
func WithSignalChan ¶
func WithSignalChan(ch chan struct{}) Option
WithSignalChan provides a way to be signaled when the local state cache has been updated. This is used for testing.
func WithTLSConfig ¶ added in v0.6.1
WithTLSConfig provides a way to assign a custom tls config for the gRPC server.
type ServiceabilityProgramClient ¶ added in v0.5.3
type ServiceabilityProgramClient interface {
GetProgramData(context.Context) (*serviceability.ProgramData, error)
ProgramID() solana.PublicKey
}
type Tunnel ¶
type Tunnel struct {
Id int
UnderlaySrcIP net.IP
UnderlayDstIP net.IP
OverlaySrcIP net.IP // This needs to be derived based on the tunnel net
OverlayDstIP net.IP // This needs to be derived based on the tunnel net
DzIp net.IP
PubKey string
Allocated bool
IsMulticast bool
MulticastBoundaryList []net.IP
MulticastSubscribers []net.IP
MulticastPublishers []net.IP
}
Click to show internal directories.
Click to hide internal directories.