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()
Click to show internal directories.
Click to hide internal directories.