Help us shape the future of Go! Take the 2026 Go Developer Survey

bgpv2

package
v1.18.16 Latest Latest
Warning

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

Go to latest
Published: Oct 23, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cell = cell.Module(
	"bgp-cp-operator",
	"BGP Control Plane Operator",
	cell.ProvidePrivate(newSecretResource),
	cell.Invoke(registerBGPResourceManager),
	cell.Invoke(registerPeerConfigStatusReconciler),
	metrics.Metric(NewBGPOperatorMetrics),
)

Functions

func TrimError

func TrimError(err error, maxLen int) error

TrimError trims error message to maxLen.

Types

type BGPOperatorMetrics added in v1.17.0

type BGPOperatorMetrics struct {
	// ReconcileErrorsTotal is the number of errors during reconciliation of BGP configuration.
	ReconcileErrorsTotal metric.Vec[metric.Counter]

	// ReconcileRunDuration measures the duration of the reconciliation run. Histogram can
	// be used to observe the total number of reconciliation runs and distribution of the run duration.
	ReconcileRunDuration metric.Vec[metric.Observer]
}

BGPOperatorMetrics contains all metrics for the BGP control plane operator.

func NewBGPOperatorMetrics added in v1.17.0

func NewBGPOperatorMetrics() *BGPOperatorMetrics

NewBGPOperatorMetrics returns a new BGPOperatorMetrics with all metrics initialized.

type BGPParams

type BGPParams struct {
	cell.In

	Logger       *slog.Logger
	LC           cell.Lifecycle
	Clientset    k8s_client.Clientset
	DaemonConfig *option.DaemonConfig
	JobGroup     job.Group
	Health       cell.Health
	Metrics      *BGPOperatorMetrics

	// resource tracking
	ClusterConfigResource      resource.Resource[*v2.CiliumBGPClusterConfig]
	NodeConfigOverrideResource resource.Resource[*v2.CiliumBGPNodeConfigOverride]
	NodeConfigResource         resource.Resource[*v2.CiliumBGPNodeConfig]
	PeerConfigResource         resource.Resource[*v2.CiliumBGPPeerConfig]
	NodeResource               resource.Resource[*v2.CiliumNode]
}

type BGPResourceManager

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

func (*BGPResourceManager) Run

func (b *BGPResourceManager) Run(ctx context.Context) (err error)

Run starts the BGPResourceManager operator.

type RouterIDKey added in v1.18.0

type RouterIDKey struct {
	NodeName     string
	InstanceName string
}

Jump to

Keyboard shortcuts

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