instance

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BGPInstance

type BGPInstance struct {
	Name      string
	Global    types.BGPGlobal
	CancelCtx context.CancelFunc
	Config    *v2.CiliumBGPNodeInstance
	Router    types.Router
	// contains filtered or unexported fields
}

BGPInstance is a container for providing interface with underlying router implementation.

func NewBGPInstance

func NewBGPInstance(ctx context.Context, routerProvider types.RouterProvider, log *slog.Logger, name string, params types.ServerParameters) (*BGPInstance, error)

NewBGPInstance will start an underlying BGP instance using the provided types.RouterProvider, utilizing types.ServerParameters for its initial configuration.

The returned BGPInstance has a nil CiliumBGPNodeInstance config, and is ready to be provided to ReconcileBGPConfig.

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

func NewFakeBGPInstance

func NewFakeBGPInstance() *BGPInstance

NewFakeBGPInstance is fake BGP instance, to be used in unit tests.

func NewFakeBGPInstanceWithName

func NewFakeBGPInstanceWithName(name string) *BGPInstance

func (*BGPInstance) NotifyStateChange

func (i *BGPInstance) NotifyStateChange()

Jump to

Keyboard shortcuts

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