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: 10 Imported by: 9

Documentation

Index

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.

func (*STNDescriptor) Validate

func (d *STNDescriptor) Validate(key string, stn *stn.Rule) error

Validate validates VPP STN rule configuration.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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