frontend

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BirdStats added in v1.0.17

type BirdStats struct {
	// contains filtered or unexported fields
}

func ParseShowProtocolsAll added in v1.0.17

func ParseShowProtocolsAll(output string) []*BirdStats

func (*BirdStats) String added in v1.0.17

func (bs *BirdStats) String() string

type FrontEndService

type FrontEndService struct {
	// contains filtered or unexported fields
}

FrontEndService -

func NewFrontEndService

func NewFrontEndService(ctx context.Context, c *feConfig.Config, gatewayMetrics *GatewayMetrics) *FrontEndService

FrontEndService -

func (*FrontEndService) CleanUp

func (fes *FrontEndService) CleanUp()

CleanUp - Basic clean-up of FrontEndService

func (*FrontEndService) Init

func (fes *FrontEndService) Init() error

func (*FrontEndService) Monitor

func (fes *FrontEndService) Monitor(ctx context.Context, errCh chan<- error)

Monitor - Check bgp prorocols' status by periodically querying birdc. - Log changes in availablity/connectivity. - Reflect external connectivity through NSP to be used by LBs to steer outbound traffic. - Withdraw VIPs in case FE is considered down, in order to not attract traffic through other available links if any. More like VIPs must be added to BIRD only if the frontend is considered up. (Note: IPv4/IPv6 backplane not separated). - Log statistics related to routes managed by the routing suite.

func (*FrontEndService) RemoveVIPRules

func (fes *FrontEndService) RemoveVIPRules() error

RemoveVipRules - Remove all the previously installed VIP src routing rules

func (*FrontEndService) SetNewConfig

func (fes *FrontEndService) SetNewConfig(ctx context.Context, c interface{}) error

SetNewConfig - Adjust BIRD config on the fly

func (*FrontEndService) Start

func (fes *FrontEndService) Start(ctx context.Context, errCh chan<- error)

Start - Start BIRD with the generated config

func (*FrontEndService) Stop added in v0.4.0

func (fes *FrontEndService) Stop(ctx context.Context)

Stop - Stop BIRD (attempt graceful shutdown)

func (*FrontEndService) VerifyConfig

func (fes *FrontEndService) VerifyConfig(ctx context.Context) error

VerifyConfig - Verify BIRD config file

prerequisite: BIRD must be running so that birdc could talk to it

func (*FrontEndService) WaitStart

func (fes *FrontEndService) WaitStart(ctx context.Context) error

WaitStart - Wait until BIRD started by checking birdc availability

type GatewayMetrics added in v1.0.17

type GatewayMetrics struct {
	RoutingService *bird.RoutingService
	// contains filtered or unexported fields
}

func NewGatewayMetrics added in v1.0.17

func NewGatewayMetrics(metricAttributes []metric.ObserveOption) *GatewayMetrics

func (*GatewayMetrics) Collect added in v1.0.17

func (gm *GatewayMetrics) Collect() error

Collect collects the metrics for the gateways.

func (*GatewayMetrics) Set added in v1.0.17

func (gm *GatewayMetrics) Set(gateways []*nspAPI.Gateway)

type RateLimiter added in v1.0.12

type RateLimiter struct {
	// contains filtered or unexported fields
}

func NewRateLimiter added in v1.0.12

func NewRateLimiter(limit int, threshold uint64) *RateLimiter

func (*RateLimiter) Active added in v1.0.12

func (rl *RateLimiter) Active() bool

Active - Returns true if rate limiter is active

func (*RateLimiter) Permit added in v1.0.12

func (rl *RateLimiter) Permit(diff uint64) bool

Permit - Returns false if rate limiter says NOT to permit actions, true otherwise.

type RouteStats added in v1.0.12

type RouteStats struct {
	// contains filtered or unexported fields
}

func NewRouteStats added in v1.0.12

func NewRouteStats() *RouteStats

func (*RouteStats) LimiterActive added in v1.0.12

func (rs *RouteStats) LimiterActive() bool

LimiterActive - Returns true if a route limiter is set and is actived (i.e. blocks actions)

func (*RouteStats) Skip added in v1.0.12

func (rs *RouteStats) Skip(diff uint64) bool

Skip - Returns true if a rate limiter is set and its Permit() func returns false

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL