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: 9

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewIPAllocDescriptor

func NewIPAllocDescriptor(typedDescriptor *IPAllocDescriptor) *KVDescriptor

Types

type IPAllocDescriptor

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

type IPAllocDescriptorAdapter

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

func (*IPAllocDescriptorAdapter) Create

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

func (*IPAllocDescriptorAdapter) Delete

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

func (*IPAllocDescriptorAdapter) Dependencies

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

func (*IPAllocDescriptorAdapter) DerivedValues

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

func (*IPAllocDescriptorAdapter) Retrieve

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

func (*IPAllocDescriptorAdapter) Update

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

func (*IPAllocDescriptorAdapter) UpdateWithRecreate

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

func (*IPAllocDescriptorAdapter) Validate

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

func (*IPAllocDescriptorAdapter) ValueComparator

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

type IPAllocKVWithMetadata

type IPAllocKVWithMetadata struct {
	Key      string
	Value    *netalloc.IPAllocation
	Metadata *netalloc.IPAllocMetadata
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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