adapter

package
v2.2.0-beta+incompatible Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2019 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSkeletonDescriptor

func NewSkeletonDescriptor(typedDescriptor *SkeletonDescriptor) *KVDescriptor

Types

type SkeletonDescriptor

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

type SkeletonDescriptorAdapter

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

func (*SkeletonDescriptorAdapter) Create

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

func (*SkeletonDescriptorAdapter) Delete

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

func (*SkeletonDescriptorAdapter) Dependencies

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

func (*SkeletonDescriptorAdapter) DerivedValues

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

func (*SkeletonDescriptorAdapter) Retrieve

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

func (*SkeletonDescriptorAdapter) Update

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

func (*SkeletonDescriptorAdapter) UpdateWithRecreate

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

func (*SkeletonDescriptorAdapter) Validate

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

func (*SkeletonDescriptorAdapter) ValueComparator

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

type SkeletonKVWithMetadata

type SkeletonKVWithMetadata struct {
	Key      string
	Value    *model.ValueSkeleton
	Metadata *metaidx.SkeletonMetadata
	Origin   ValueOrigin
}

Jump to

Keyboard shortcuts

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