adapter

package
v2.5.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSTNDescriptor

func NewSTNDescriptor(typedDescriptor *STNDescriptor) *KVDescriptor

Types

type STNDescriptor

type STNDescriptor struct {
	Name                 string
	KeySelector          KeySelector
	ValueTypeName        string
	KeyLabel             func(key string) string
	ValueComparator      func(key string, oldValue, newValue *vpp_stn.Rule) bool
	NBKeyPrefix          string
	WithMetadata         bool
	MetadataMapFactory   MetadataMapFactory
	Validate             func(key string, value *vpp_stn.Rule) error
	Create               func(key string, value *vpp_stn.Rule) (metadata interface{}, err error)
	Delete               func(key string, value *vpp_stn.Rule, metadata interface{}) error
	Update               func(key string, oldValue, newValue *vpp_stn.Rule, oldMetadata interface{}) (newMetadata interface{}, err error)
	UpdateWithRecreate   func(key string, oldValue, newValue *vpp_stn.Rule, metadata interface{}) bool
	Retrieve             func(correlate []STNKVWithMetadata) ([]STNKVWithMetadata, error)
	IsRetriableFailure   func(err error) bool
	DerivedValues        func(key string, value *vpp_stn.Rule) []KeyValuePair
	Dependencies         func(key string, value *vpp_stn.Rule) []Dependency
	RetrieveDependencies []string /* descriptor name */
}

type STNDescriptorAdapter

type STNDescriptorAdapter struct {
	// contains filtered or unexported fields
}

func (*STNDescriptorAdapter) Create

func (da *STNDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)

func (*STNDescriptorAdapter) Delete

func (da *STNDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error

func (*STNDescriptorAdapter) Dependencies

func (da *STNDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency

func (*STNDescriptorAdapter) DerivedValues

func (da *STNDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair

func (*STNDescriptorAdapter) Retrieve

func (da *STNDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*STNDescriptorAdapter) Update

func (da *STNDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)

func (*STNDescriptorAdapter) UpdateWithRecreate

func (da *STNDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool

func (*STNDescriptorAdapter) Validate

func (da *STNDescriptorAdapter) Validate(key string, value proto.Message) (err error)

func (*STNDescriptorAdapter) ValueComparator

func (da *STNDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool

type STNKVWithMetadata

type STNKVWithMetadata struct {
	Key      string
	Value    *vpp_stn.Rule
	Metadata interface{}
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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