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 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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