Documentation ¶
Index ¶
- func NewSkeletonDescriptor(typedDescriptor *SkeletonDescriptor) *KVDescriptor
- type SkeletonDescriptor
- type SkeletonDescriptorAdapter
- func (da *SkeletonDescriptorAdapter) Create(key string, value proto.Message) (metadata Metadata, err error)
- func (da *SkeletonDescriptorAdapter) Delete(key string, value proto.Message, metadata Metadata) error
- func (da *SkeletonDescriptorAdapter) Dependencies(key string, value proto.Message) []Dependency
- func (da *SkeletonDescriptorAdapter) DerivedValues(key string, value proto.Message) []KeyValuePair
- func (da *SkeletonDescriptorAdapter) Retrieve(correlate []KVWithMetadata) ([]KVWithMetadata, error)
- func (da *SkeletonDescriptorAdapter) Update(key string, oldValue, newValue proto.Message, oldMetadata Metadata) (newMetadata Metadata, err error)
- func (da *SkeletonDescriptorAdapter) UpdateWithRecreate(key string, oldValue, newValue proto.Message, metadata Metadata) bool
- func (da *SkeletonDescriptorAdapter) Validate(key string, value proto.Message) (err error)
- func (da *SkeletonDescriptorAdapter) ValueComparator(key string, oldValue, newValue proto.Message) bool
- type SkeletonKVWithMetadata
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 interface{}, err error) Delete func(key string, value *model.ValueSkeleton, metadata interface{}) error Update func(key string, oldValue, newValue *model.ValueSkeleton, oldMetadata interface{}) (newMetadata interface{}, err error) UpdateWithRecreate func(key string, oldValue, newValue *model.ValueSkeleton, metadata interface{}) 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 interface{} Origin ValueOrigin }
Click to show internal directories.
Click to hide internal directories.