descriptor

package
v2.1.1+incompatible Latest Latest
Warning

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

Go to latest
Published: May 27, 2019 License: Apache-2.0 Imports: 9 Imported by: 9

Documentation

Index

Constants

View Source
const (
	// IPRedirectDescriptorName is the name of the descriptor for the VPP punt to host/socket
	IPRedirectDescriptorName = "vpp-punt-ipredirect"
)
View Source
const (
	// PuntToHostDescriptorName is the name of the descriptor for the VPP punt to host/socket
	PuntToHostDescriptorName = "vpp-punt-to-host"
)

Variables

View Source
var (
	// ErrIPRedirectWithoutL3Protocol is returned when VPP IP redirect has undefined L3 protocol.
	ErrIPRedirectWithoutL3Protocol = errors.New("VPP IP punt redirect defined without L3 protocol")

	// ErrPuntWithoutL4Protocol is returned when VPP IP redirect has undefined L4 tx interface.
	ErrIPRedirectWithoutTxInterface = errors.New("VPP IP punt redirect defined without tx interface")

	// ErrIPRedirectWithoutNextHop is returned when VPP IP redirect has undefined next hop address.
	ErrIPRedirectWithoutNextHop = errors.New("VPP IP punt redirect defined without tx interface")
)

A list of non-retriable errors:

View Source
var (
	// ErrPuntWithoutL3Protocol is returned when VPP punt has undefined L3 protocol.
	ErrPuntWithoutL3Protocol = errors.New("VPP punt defined without L3 protocol")

	// ErrPuntWithoutL4Protocol is returned when VPP punt has undefined L4 protocol.
	ErrPuntWithoutL4Protocol = errors.New("VPP punt defined without L4 protocol")

	// ErrPuntWithoutPort is returned when VPP punt has undefined port.
	ErrPuntWithoutPort = errors.New("VPP punt defined without port")
)

A list of non-retriable errors:

Functions

This section is empty.

Types

type IPRedirectDescriptor

type IPRedirectDescriptor struct {
	// contains filtered or unexported fields
}

IPRedirectDescriptor teaches KVScheduler how to configure VPP IP punt redirect.

func NewIPRedirectDescriptor

func NewIPRedirectDescriptor(puntHandler vppcalls.PuntVppAPI, log logging.LoggerFactory) *IPRedirectDescriptor

NewIPRedirectDescriptor creates a new instance of the punt to host descriptor.

func (*IPRedirectDescriptor) Create

func (d *IPRedirectDescriptor) Create(key string, redirect *punt.IPRedirect) (metadata interface{}, err error)

Create adds new IP punt redirect entry.

func (*IPRedirectDescriptor) Delete

func (d *IPRedirectDescriptor) Delete(key string, redirect *punt.IPRedirect, metadata interface{}) error

Delete removes VPP IP punt redirect configuration.

func (*IPRedirectDescriptor) Dependencies

func (d *IPRedirectDescriptor) Dependencies(key string, redirect *punt.IPRedirect) (dependencies []kvs.Dependency)

Dependencies for IP punt redirect are represented by tx interface

func (*IPRedirectDescriptor) EquivalentIPRedirect

func (d *IPRedirectDescriptor) EquivalentIPRedirect(key string, oldIPRedirect, newIPRedirect *punt.IPRedirect) bool

EquivalentIPRedirect is case-insensitive comparison function for punt.IpRedirect.

func (*IPRedirectDescriptor) GetDescriptor

GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.

func (*IPRedirectDescriptor) Retrieve

Retrieve returns all configured VPP punt to host entries.

func (*IPRedirectDescriptor) Validate

func (d *IPRedirectDescriptor) Validate(key string, redirect *punt.IPRedirect) error

Validate validates VPP punt configuration.

type PuntToHostDescriptor

type PuntToHostDescriptor struct {
	RegisterSocketFn func(register bool, toHost *punt.ToHost, socketPath string)
	// contains filtered or unexported fields
}

PuntToHostDescriptor teaches KVScheduler how to configure VPP punt to host or unix domain socket.

func NewPuntToHostDescriptor

func NewPuntToHostDescriptor(puntHandler vppcalls.PuntVppAPI, log logging.LoggerFactory) *PuntToHostDescriptor

NewPuntToHostDescriptor creates a new instance of the punt to host descriptor.

func (*PuntToHostDescriptor) Create

func (d *PuntToHostDescriptor) Create(key string, punt *punt.ToHost) (interface{}, error)

Create adds new punt to host entry or registers new punt to unix domain socket.

func (*PuntToHostDescriptor) Delete

func (d *PuntToHostDescriptor) Delete(key string, punt *punt.ToHost, metadata interface{}) error

Delete removes VPP punt configuration.

func (*PuntToHostDescriptor) EquivalentPuntToHost

func (d *PuntToHostDescriptor) EquivalentPuntToHost(key string, oldPunt, newPunt *punt.ToHost) bool

EquivalentPuntToHost is case-insensitive comparison function for punt.ToHost.

func (*PuntToHostDescriptor) GetDescriptor

GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.

func (*PuntToHostDescriptor) Retrieve

func (d *PuntToHostDescriptor) Retrieve(correlate []adapter.PuntToHostKVWithMetadata) (retrieved []adapter.PuntToHostKVWithMetadata, err error)

Retrieve returns all configured VPP punt to host entries.

func (*PuntToHostDescriptor) Validate

func (d *PuntToHostDescriptor) Validate(key string, puntCfg *punt.ToHost) error

Validate validates VPP punt configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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