Documentation
¶
Index ¶
- func Config(ctx context.Context) *configurator.Config
- func ConnectionMap(ctx context.Context) map[string]*interfaces.Interface
- func NewBridgeConnect(configuration *common.NSConfiguration, bridgeName string) networkservice.NetworkServiceServer
- func WithConfig(parent context.Context) context.Context
- func WithConnectionMap(parent context.Context) context.Context
- type ACL
- type ClientMemifConnect
- type Commit
- type MemifConnect
- type XConnect
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Config ¶
func Config(ctx context.Context) *configurator.Config
Config -
Returns the Config from the Context (if any is present) Recommended use: in any Request or Close call, start with: ctx = WithVppAgentConfig(ctx) to ensure that the ctx has a Config followed by: vppAgentConfig := Config(ctx) to retrieve the Config from the context.Context feel free to *edit* the Config, but you cannot *replace* it for the Context of a given call.
func ConnectionMap ¶
func ConnectionMap(ctx context.Context) map[string]*interfaces.Interface
ConnectionMap -
Returns the ConnectionMap from the Context (if any is present) Recommended use: in any Request or Close call, start with: ctx = WithConnectionMap(ctx) to ensure that the ctx has a ConnectionMap followed by: connectionMap := ConnectionMap(ctx) to retrieve the ConnectionMap from the context.Context feel free to *edit* the ConnectionMap, but you cannot *replace* it for the Context of a given call.
func NewBridgeConnect ¶
func NewBridgeConnect(configuration *common.NSConfiguration, bridgeName string) networkservice.NetworkServiceServer
NewBridgeConnect creates a new Bridge Endpoint
func WithConfig ¶
WithConfig -
If 'parent' already has a VppAgentConfig value, returns 'parent' Else wraps 'parent' in a new Context that has an empty VppAgentConfig using Context.Value(...) and returns the result. Recommended use: in any Request or Close call, start with: ctx = WithConfig(ctx) to ensure that the ctx has a VppAgentConfig followed by: vppAgentConfig := VppAgentConfig(ctx) to retrieve the VppAgentConfig from the context.Context feel free to *edit* the VppAgentConfig, but you cannot *replace* it for the Context of a given call.
func WithConnectionMap ¶
WithConnectionMap -
If 'parent' already has a ConnectionMap value, returns 'parent' Else wraps 'parent' in a new Context that has an empty ConnectionMap using Context.Value(...) and returns the result. A ConnectionMap is simply a map[*connection.Connection]*interfaces.Interface) mapping Connections to the VppAgent Interface objects they as associated with Recommended use: in any Request or Close call, start with: ctx = WithConnectionMap(ctx) to ensure that the ctx has a ConnectionMap followed by: connectionMap := ConnectionMap(ctx) to retrieve the ConnectionMap from the context.Context feel free to *edit* the ConnectionMap, but you cannot *replace* it for the Context of a given call.
Types ¶
type ACL ¶
ACL is a VPP Agent ACL composite
func (*ACL) Close ¶
func (a *ACL) Close(ctx context.Context, connection *connection.Connection) (*empty.Empty, error)
Close implements the close handler Provides/Consumes from ctx context.Context:
VppAgentConfig ConnectionMap
func (*ACL) Request ¶
func (a *ACL) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*connection.Connection, error)
Request implements the request handler Provides/Consumes from ctx context.Context:
VppAgentConfig ConnectionMap
type ClientMemifConnect ¶
type ClientMemifConnect struct {
Workspace string
}
ClientMemifConnect is a VPP Agent Client Memif Connect composite
func NewClientMemifConnect ¶
func NewClientMemifConnect(configuration *common.NSConfiguration) *ClientMemifConnect
NewClientMemifConnect creates a ClientMemifConnect
func (*ClientMemifConnect) Close ¶
func (cmc *ClientMemifConnect) Close(ctx context.Context, connection *connection.Connection) (*empty.Empty, error)
Close implements the close handler Request implements the request handler Provides/Consumes from ctx context.Context:
VppAgentConfig ClientConnection Next
func (*ClientMemifConnect) Name ¶
func (cmc *ClientMemifConnect) Name() string
Name returns the composite name
func (*ClientMemifConnect) Request ¶
func (cmc *ClientMemifConnect) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*connection.Connection, error)
Request implements the request handler Provides/Consumes from ctx context.Context:
VppAgentConfig ClientConnection Next
type Commit ¶
type Commit struct { Endpoint string // contains filtered or unexported fields }
Commit is a VPP Agent Commit composite
func NewCommit ¶
NewCommit creates a new Commit endpoint. The Commit endpoint commits any changes accumulated in the vppagent.Config in the context.Context to vppagent
func (*Commit) Close ¶
func (c *Commit) Close(ctx context.Context, connection *connection.Connection) (*empty.Empty, error)
Close implements the close handler Provides/Consumes from ctx context.Context:
VppAgentConfig Next
func (*Commit) Init ¶
func (c *Commit) Init(*endpoint.InitContext) error
Init will reset the vpp shouldResetVpp is true
func (*Commit) Request ¶
func (c *Commit) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*connection.Connection, error)
Request implements the request handler Provides/Consumes from ctx context.Context:
VppAgentConfig Next
type MemifConnect ¶
type MemifConnect struct {
Workspace string
}
MemifConnect is a VPP Agent Memif Connect composite
func NewMemifConnect ¶
func NewMemifConnect(configuration *common.NSConfiguration) *MemifConnect
NewMemifConnect creates a MemifConnect
func (*MemifConnect) Close ¶
func (mc *MemifConnect) Close(ctx context.Context, connection *connection.Connection) (*empty.Empty, error)
Close implements the close handler Provides/Consumes from ctx context.Context:
VppAgentConfig ConnectionMap Next
func (*MemifConnect) Request ¶
func (mc *MemifConnect) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*connection.Connection, error)
Request implements the request handler Provides/Consumes from ctx context.Context:
VppAgentConfig ConnectionMap
type XConnect ¶
type XConnect struct {
Workspace string
}
XConnect is a VPP Agent Cross Connect composite
func NewXConnect ¶
func NewXConnect(configuration *common.NSConfiguration) *XConnect
NewXConnect creates a XConnect
func (*XConnect) Close ¶
func (xc *XConnect) Close(ctx context.Context, connection *connection.Connection) (*empty.Empty, error)
Close implements the close handler Provides/Consumes from ctx context.Context:
VppAgentConfig Next
func (*XConnect) Request ¶
func (xc *XConnect) Request(ctx context.Context, request *networkservice.NetworkServiceRequest) (*connection.Connection, error)
Request implements the request handler Provides/Consumes from ctx context.Context:
VppAgentConfig Next