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 PuntToHostDescriptor
- func (d *PuntToHostDescriptor) Create(key string, punt *punt.ToHost) (metadata interface{}, err 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 (
// 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") )
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 PuntToHostDescriptor ¶
type PuntToHostDescriptor struct {
// 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) (metadata interface{}, err 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.