adapter

package
v2.0.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2018 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewInterfaceDescriptor

func NewInterfaceDescriptor(typedDescriptor *InterfaceDescriptor) *KVDescriptor

Types

type InterfaceDescriptor

type InterfaceDescriptor struct {
	Name               string
	KeySelector        KeySelector
	ValueTypeName      string
	KeyLabel           func(key string) string
	ValueComparator    func(key string, oldValue, newValue *interfaces.LinuxInterface) bool
	NBKeyPrefix        string
	WithMetadata       bool
	MetadataMapFactory MetadataMapFactory
	Add                func(key string, value *interfaces.LinuxInterface) (metadata *ifaceidx.LinuxIfMetadata, err error)
	Delete             func(key string, value *interfaces.LinuxInterface, metadata *ifaceidx.LinuxIfMetadata) error
	Modify             func(key string, oldValue, newValue *interfaces.LinuxInterface, oldMetadata *ifaceidx.LinuxIfMetadata) (newMetadata *ifaceidx.LinuxIfMetadata, err error)
	ModifyWithRecreate func(key string, oldValue, newValue *interfaces.LinuxInterface, metadata *ifaceidx.LinuxIfMetadata) bool
	Update             func(key string, value *interfaces.LinuxInterface, metadata *ifaceidx.LinuxIfMetadata) error
	IsRetriableFailure func(err error) bool
	Dependencies       func(key string, value *interfaces.LinuxInterface) []Dependency
	DerivedValues      func(key string, value *interfaces.LinuxInterface) []KeyValuePair
	Dump               func(correlate []InterfaceKVWithMetadata) ([]InterfaceKVWithMetadata, error)
	DumpDependencies   []string /* descriptor name */
}

type InterfaceDescriptorAdapter

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

func (*InterfaceDescriptorAdapter) Add

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

func (*InterfaceDescriptorAdapter) Delete

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

func (*InterfaceDescriptorAdapter) Dependencies

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

func (*InterfaceDescriptorAdapter) DerivedValues

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

func (*InterfaceDescriptorAdapter) Dump

func (da *InterfaceDescriptorAdapter) Dump(correlate []KVWithMetadata) ([]KVWithMetadata, error)

func (*InterfaceDescriptorAdapter) Modify

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

func (*InterfaceDescriptorAdapter) ModifyWithRecreate

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

func (*InterfaceDescriptorAdapter) Update

func (da *InterfaceDescriptorAdapter) Update(key string, value proto.Message, metadata Metadata) error

func (*InterfaceDescriptorAdapter) ValueComparator

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

type InterfaceKVWithMetadata

type InterfaceKVWithMetadata struct {
	Key      string
	Value    *interfaces.LinuxInterface
	Metadata *ifaceidx.LinuxIfMetadata
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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