Documentation ¶
Index ¶
- Constants
- Variables
- type STNDescriptor
- func (d *STNDescriptor) Create(key string, stn *stn.Rule) (metadata interface{}, err error)
- func (d *STNDescriptor) Delete(key string, stn *stn.Rule, metadata interface{}) error
- func (d *STNDescriptor) Dependencies(key string, stn *stn.Rule) (dependencies []kvs.Dependency)
- func (d *STNDescriptor) EquivalentSTNs(key string, oldSTN, newSTN *stn.Rule) bool
- func (d *STNDescriptor) GetDescriptor() *adapter.STNDescriptor
- func (d *STNDescriptor) Retrieve(correlate []adapter.STNKVWithMetadata) (retrieved []adapter.STNKVWithMetadata, err error)
- func (d *STNDescriptor) Validate(key string, stn *stn.Rule) error
Constants ¶
View Source
const (
// STNDescriptorName is the name of the descriptor for VPP STN rules
STNDescriptorName = "vpp-stn-rules"
)
Variables ¶
View Source
var ( // ErrSTNWithoutInterface is returned when VPP STN rule has undefined interface. ErrSTNWithoutInterface = errors.New("VPP STN rule defined without interface") // ErrSTNWithoutIPAddress is returned when VPP STN rule has undefined IP address. ErrSTNWithoutIPAddress = errors.New("VPP STN rule defined without IP address") )
A list of non-retriable errors:
Functions ¶
This section is empty.
Types ¶
type STNDescriptor ¶
type STNDescriptor struct {
// contains filtered or unexported fields
}
STNDescriptor teaches KVScheduler how to configure VPP STN rules.
func NewSTNDescriptor ¶
func NewSTNDescriptor(stnHandler vppcalls.StnVppAPI, log logging.PluginLogger) *STNDescriptor
NewSTNDescriptor creates a new instance of the STN descriptor.
func (*STNDescriptor) Create ¶
func (d *STNDescriptor) Create(key string, stn *stn.Rule) (metadata interface{}, err error)
Create adds new STN rule.
func (*STNDescriptor) Delete ¶
func (d *STNDescriptor) Delete(key string, stn *stn.Rule, metadata interface{}) error
Delete removes VPP STN rule.
func (*STNDescriptor) Dependencies ¶
func (d *STNDescriptor) Dependencies(key string, stn *stn.Rule) (dependencies []kvs.Dependency)
Dependencies for STN rule are represented by interface
func (*STNDescriptor) EquivalentSTNs ¶
func (d *STNDescriptor) EquivalentSTNs(key string, oldSTN, newSTN *stn.Rule) bool
EquivalentSTNs is case-insensitive comparison function for stn.Rule.
func (*STNDescriptor) GetDescriptor ¶
func (d *STNDescriptor) GetDescriptor() *adapter.STNDescriptor
GetDescriptor returns descriptor suitable for registration (via adapter) with the KVScheduler.
func (*STNDescriptor) Retrieve ¶
func (d *STNDescriptor) Retrieve(correlate []adapter.STNKVWithMetadata) (retrieved []adapter.STNKVWithMetadata, err error)
Retrieve returns all configured VPP STN rules.
Click to show internal directories.
Click to hide internal directories.