Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ServerWithConfig ¶
type ServerWithConfig struct {
// ASN is the local ASN number of the virtual router instance.
ASN uint32
// 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.