Documentation ¶
Index ¶
- Constants
- Variables
- type IPRedirectDescriptor
- func (d *IPRedirectDescriptor) Create(key string, redirect *punt.IPRedirect) (metadata interface{}, err error)
- func (d *IPRedirectDescriptor) Delete(key string, redirect *punt.IPRedirect, metadata interface{}) error
- func (d *IPRedirectDescriptor) Dependencies(key string, redirect *punt.IPRedirect) (dependencies []kvs.Dependency)
- func (d *IPRedirectDescriptor) EquivalentIPRedirect(key string, oldIPRedirect, newIPRedirect *punt.IPRedirect) bool
- func (d *IPRedirectDescriptor) GetDescriptor() *adapter.IPPuntRedirectDescriptor
- func (d *IPRedirectDescriptor) Retrieve(correlate []adapter.IPPuntRedirectKVWithMetadata) (dump []adapter.IPPuntRedirectKVWithMetadata, err error)
- func (d *IPRedirectDescriptor) Validate(key string, redirect *punt.IPRedirect) error
- type PuntExceptionDescriptor
- func (d *PuntExceptionDescriptor) Create(key string, punt *punt.Exception) (interface{}, error)
- func (d *PuntExceptionDescriptor) Delete(key string, punt *punt.Exception, metadata interface{}) error
- func (d *PuntExceptionDescriptor) EquivalentPuntException(key string, oldPunt, newPunt *punt.Exception) bool
- func (d *PuntExceptionDescriptor) GetDescriptor() *adapter.PuntExceptionDescriptor
- func (d *PuntExceptionDescriptor) Retrieve(correlate []adapter.PuntExceptionKVWithMetadata) (retrieved []adapter.PuntExceptionKVWithMetadata, err error)
- func (d *PuntExceptionDescriptor) Validate(key string, puntCfg *punt.Exception) error
- type PuntToHostDescriptor
- func (d *PuntToHostDescriptor) Create(key string, punt *punt.ToHost) (interface{}, error)
- func (d *PuntToHostDescriptor) Delete(key string, punt *punt.ToHost, metadata interface{}) error
- func (d *PuntToHostDescriptor) EquivalentPuntToHost(key string, oldPunt, newPunt *punt.ToHost) bool
- func (d *PuntToHostDescriptor) GetDescriptor() *adapter.PuntToHostDescriptor
- func (d *PuntToHostDescriptor) Retrieve(correlate []adapter.PuntToHostKVWithMetadata) (retrieved []adapter.PuntToHostKVWithMetadata, err error)
- func (d *PuntToHostDescriptor) Validate(key string, puntCfg *punt.ToHost) error
Constants ¶
const (
// IPRedirectDescriptorName is the name of the descriptor for the VPP punt to host/socket
IPRedirectDescriptorName = "vpp-punt-ipredirect"
)
const (
// PuntExceptionDescriptorName is the name of the descriptor for the VPP punt exception
PuntExceptionDescriptorName = "vpp-punt-exception"
)
const (
// PuntToHostDescriptorName is the name of the descriptor for the VPP punt to host/socket
PuntToHostDescriptorName = "vpp-punt-to-host"
)
Variables ¶
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:
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:
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 ¶
func (d *IPRedirectDescriptor) GetDescriptor() *adapter.IPPuntRedirectDescriptor
GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.
func (*IPRedirectDescriptor) Retrieve ¶
func (d *IPRedirectDescriptor) Retrieve(correlate []adapter.IPPuntRedirectKVWithMetadata) (dump []adapter.IPPuntRedirectKVWithMetadata, err error)
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 ¶
func (d *PuntExceptionDescriptor) GetDescriptor() *adapter.PuntExceptionDescriptor
GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.
func (*PuntExceptionDescriptor) Retrieve ¶
func (d *PuntExceptionDescriptor) Retrieve(correlate []adapter.PuntExceptionKVWithMetadata) (retrieved []adapter.PuntExceptionKVWithMetadata, err error)
Retrieve returns all configured VPP punt exception entries.
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 ¶
func (d *PuntToHostDescriptor) GetDescriptor() *adapter.PuntToHostDescriptor
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.