instance

package
v1.15.5 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ServerWithConfig

type ServerWithConfig struct {
	// backed BgpServer configured in accordance to the accompanying
	// CiliumBGPVirtualRouter configuration.
	Server types.Router

	// The CiliumBGPVirtualRouter configuration which drives the configuration
	// of the above BgpServer.
	//
	// If this field is nil it means the above BgpServer has had no
	// configuration applied to it.
	Config *v2alpha1api.CiliumBGPVirtualRouter

	// ReconcilerMetadata holds reconciler-specific metadata keyed by the reconciler name,
	// opaque outside the respective reconciler.
	ReconcilerMetadata map[string]any
}

ServerWithConfig is a container for providing interface with underlying router implementation and Cilium's BGP control plane related configuration.

It exports a method set for manipulating the BgpServer. However, this struct is a dumb object. The calling code is required to keep the BgpServer's configuration and associated configuration fields in sync.

func NewServerWithConfig

func NewServerWithConfig(ctx context.Context, log *logrus.Entry, params types.ServerParameters) (*ServerWithConfig, error)

NewServerWithConfig will start an underlying BgpServer utilizing types.ServerParameters for its initial configuration.

The returned ServerWithConfig has a nil CiliumBGPVirtualRouter config, and is ready to be provided to ReconcileBGPConfig.

Canceling the provided context will kill the BgpServer along with calling the underlying BgpServer's Stop() method.

Jump to

Keyboard shortcuts

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