vppagent

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: Apache-2.0 Imports: 22 Imported by: 2

Documentation

Index

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

func WithConfig(parent context.Context) context.Context

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

func WithConnectionMap(parent context.Context) context.Context

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

type ACL struct {
	Rules map[string]string
}

ACL is a VPP Agent ACL composite

func NewACL

func NewACL(rules map[string]string) *ACL

NewACL creates an ACL

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) Name

func (a *ACL) Name() string

Name returns the composite name

func (*ACL) Request

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

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

func NewCommit(endpoint string, shouldResetVpp bool) *Commit

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

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) Name

func (mc *MemifConnect) Name() string

Name returns the composite name

func (*MemifConnect) Request

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) Name

func (xc *XConnect) Name() string

Name returns the composite name

func (*XConnect) Request

Request implements the request handler Provides/Consumes from ctx context.Context:

    VppAgentConfig
	   Next

Jump to

Keyboard shortcuts

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