Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Advertisement ¶ added in v1.14.0
type Advertisement struct { Prefix netip.Prefix GoBGPPathUUID []byte // path identifier in underlying implementation }
Advertisement is a container object which associates a netip.Prefix
The `Prefix` field makes comparing this Advertisement with another Prefix encoded prefixes simple.
The `GoBGPPathUUID` field is a gobgp.AddPathResponse.Uuid object which can be forwarded to gobgp's WithdrawPath method, making withdrawing an advertised route simple.
type BGPGlobal ¶
type BGPGlobal struct { ASN uint32 RouterID string ListenPort int32 // When -1 gobgp won't listen on tcp:179 RouteSelectionOptions *RouteSelectionOptions }
BGPGlobal contains high level BGP configuration for given instance.
type GetBGPResponse ¶
type GetBGPResponse struct {
Global BGPGlobal
}
GetBGPResponse contains BGP global parameters
type GetPeerStateResponse ¶
GetPeerStateResponse contains state of peers configured in given instance
type NeighborRequest ¶
type NeighborRequest struct { Neighbor *v2alpha1api.CiliumBGPNeighbor VR *v2alpha1api.CiliumBGPVirtualRouter }
NeighborRequest contains neighbor parameters used when enabling or disabling peer
type PathRequest ¶
type PathRequest struct {
Advert Advertisement
}
PathRequest contains parameters for advertising or withdrawing routes
type PathResponse ¶
type PathResponse struct {
Advert Advertisement
}
PathResponse contains response after advertising the route, underlying implementation will set UUID
type RouteSelectionOptions ¶
type RouteSelectionOptions struct { // AdvertiseInactiveRoutes when set will advertise route even if it is not present in RIB AdvertiseInactiveRoutes bool }
RouteSelectionOptions contains generic BGP route selection tuning parameters
type Router ¶
type Router interface { Stop() // AddNeighbor configures BGP peer AddNeighbor(ctx context.Context, n NeighborRequest) error // UpdateNeighbor updates BGP peer UpdateNeighbor(ctx context.Context, n NeighborRequest) error // RemoveNeighbor removes BGP peer RemoveNeighbor(ctx context.Context, n NeighborRequest) error // AdvertisePath advertises BGP route to all configured peers AdvertisePath(ctx context.Context, p PathRequest) (PathResponse, error) // WithdrawPath removes BGP route from all peers WithdrawPath(ctx context.Context, p PathRequest) error // GetPeerState returns status of BGP peers GetPeerState(ctx context.Context) (GetPeerStateResponse, error) // GetBGP returns configured BGP global parameters GetBGP(ctx context.Context) (GetBGPResponse, error) }
Router is vendor-agnostic cilium bgp configuration layer. Parameters of this layer are standard BGP RFC complaint and not specific to any underlying implementation.
type Safi ¶
type Safi uint32
Safi is subsequent address family identifier
const ( SafiUnknown Safi = 0 SafiUnicast Safi = 1 SafiMulticast Safi = 2 SafiMplsLabel Safi = 4 SafiEncapsulation Safi = 7 SafiVpls Safi = 65 SafiEvpn Safi = 70 SafiLs Safi = 71 SafiSrPolicy Safi = 73 SafiMup Safi = 85 SafiMplsVpn Safi = 128 SafiMplsVpnMulticast Safi = 129 SafiRouteTargetConstraints Safi = 132 SafiFlowSpecUnicast Safi = 133 SafiFlowSpecVpn Safi = 134 SafiKeyValue Safi = 241 )
type ServerParameters ¶
type ServerParameters struct {
Global BGPGlobal
}
ServerParameters contains information for underlying bgp implementation layer to initializing BGP process.
type SessionState ¶
type SessionState uint32
SessionState as defined in rfc4271#section-8.2.2
const ( SessionUnknown SessionState = iota SessionIdle SessionConnect SessionActive SessionOpenSent SessionOpenConfirm SessionEstablished )
func (SessionState) String ¶
func (s SessionState) String() string