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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewABFDescriptor

func NewABFDescriptor(typedDescriptor *ABFDescriptor) *KVDescriptor

Types

type ABFDescriptor

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

type ABFDescriptorAdapter

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

func (*ABFDescriptorAdapter) Create

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

func (*ABFDescriptorAdapter) Delete

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

func (*ABFDescriptorAdapter) Dependencies

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

func (*ABFDescriptorAdapter) DerivedValues

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

func (*ABFDescriptorAdapter) Retrieve

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

func (*ABFDescriptorAdapter) Update

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

func (*ABFDescriptorAdapter) UpdateWithRecreate

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

func (*ABFDescriptorAdapter) Validate

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

func (*ABFDescriptorAdapter) ValueComparator

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

type ABFKVWithMetadata

type ABFKVWithMetadata struct {
	Key      string
	Value    *vpp_abf.ABF
	Metadata *abfidx.ABFMetadata
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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