descriptor

package
v3.3.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

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 (
	// PuntExceptionDescriptorName is the name of the descriptor for the VPP punt exception
	PuntExceptionDescriptorName = "vpp-punt-exception"
)
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")

	// ErrPuntWithoutSocketPath is returned when VPP punt has undefined socket path.
	ErrPuntWithoutSocketPath = errors.New("VPP punt defined without socket path")
)

A list of non-retriable errors:

View Source
var (
	// ErrPuntExceptionWithoutReason is returned when VPP punt exception has undefined reason.
	ErrPuntExceptionWithoutReason = errors.New("VPP punt exception defined without reason")
)

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 PuntExceptionDescriptor

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

PuntExceptionDescriptor teaches KVScheduler how to configure VPP putn exception.

func NewPuntExceptionDescriptor

func NewPuntExceptionDescriptor(puntHandler vppcalls.PuntVppAPI, log logging.LoggerFactory) *PuntExceptionDescriptor

NewPuntExceptionDescriptor creates a new instance of the punt exception.

func (*PuntExceptionDescriptor) Create

func (d *PuntExceptionDescriptor) Create(key string, punt *punt.Exception) (interface{}, error)

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

func (*PuntExceptionDescriptor) Delete

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

Delete removes VPP punt configuration.

func (*PuntExceptionDescriptor) EquivalentPuntException

func (d *PuntExceptionDescriptor) EquivalentPuntException(key string, oldPunt, newPunt *punt.Exception) bool

EquivalentPuntException is case-insensitive comparison function for punt.Exception.

func (*PuntExceptionDescriptor) GetDescriptor

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

func (*PuntExceptionDescriptor) Retrieve

Retrieve returns all configured VPP punt exception entries.

func (*PuntExceptionDescriptor) Validate

func (d *PuntExceptionDescriptor) Validate(key string, puntCfg *punt.Exception) 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