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

func NewUnnumberedDescriptor

func NewUnnumberedDescriptor(typedDescriptor *UnnumberedDescriptor) *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.Interface) bool
	NBKeyPrefix        string
	WithMetadata       bool
	MetadataMapFactory MetadataMapFactory
	Add                func(key string, value *interfaces.Interface) (metadata *ifaceidx.IfaceMetadata, err error)
	Delete             func(key string, value *interfaces.Interface, metadata *ifaceidx.IfaceMetadata) error
	Modify             func(key string, oldValue, newValue *interfaces.Interface, oldMetadata *ifaceidx.IfaceMetadata) (newMetadata *ifaceidx.IfaceMetadata, err error)
	ModifyWithRecreate func(key string, oldValue, newValue *interfaces.Interface, metadata *ifaceidx.IfaceMetadata) bool
	Update             func(key string, value *interfaces.Interface, metadata *ifaceidx.IfaceMetadata) error
	IsRetriableFailure func(err error) bool
	Dependencies       func(key string, value *interfaces.Interface) []Dependency
	DerivedValues      func(key string, value *interfaces.Interface) []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.Interface
	Metadata *ifaceidx.IfaceMetadata
	Origin   ValueOrigin
}

type UnnumberedDescriptor

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

type UnnumberedDescriptorAdapter

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

func (*UnnumberedDescriptorAdapter) Add

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

func (*UnnumberedDescriptorAdapter) Delete

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

func (*UnnumberedDescriptorAdapter) Dependencies

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

func (*UnnumberedDescriptorAdapter) DerivedValues

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

func (*UnnumberedDescriptorAdapter) Dump

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

func (*UnnumberedDescriptorAdapter) Modify

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

func (*UnnumberedDescriptorAdapter) ModifyWithRecreate

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

func (*UnnumberedDescriptorAdapter) Update

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

func (*UnnumberedDescriptorAdapter) ValueComparator

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

type UnnumberedKVWithMetadata

type UnnumberedKVWithMetadata struct {
	Key      string
	Value    *interfaces.Interface_Unnumbered
	Metadata interface{}
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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