Documentation ¶
Index ¶
- Constants
- func NewSkeletonDescriptor(log logging.PluginLogger) *kvs.KVDescriptor
- type SkeletonDescriptor
- func (d *SkeletonDescriptor) Create(key string, value *model.ValueSkeleton) (metadata interface{}, err error)
- func (d *SkeletonDescriptor) Delete(key string, value *model.ValueSkeleton, metadata interface{}) error
- func (d *SkeletonDescriptor) Dependencies(key string, value *model.ValueSkeleton) (deps []kvs.Dependency)
- func (d *SkeletonDescriptor) DerivedValues(key string, value *model.ValueSkeleton) (derived []kvs.KeyValuePair)
- func (d *SkeletonDescriptor) EquivalentValues(key string, old, new *model.ValueSkeleton) bool
- func (d *SkeletonDescriptor) IsRetriableFailure(err error) bool
- func (d *SkeletonDescriptor) Retrieve(correlate []adapter.SkeletonKVWithMetadata) (retrieved []adapter.SkeletonKVWithMetadata, err error)
- func (d *SkeletonDescriptor) Update(key string, old, new *model.ValueSkeleton, oldMetadata interface{}) (newMetadata interface{}, err error)
- func (d *SkeletonDescriptor) UpdateWithRecreate(key string, old, new *model.ValueSkeleton, metadata interface{}) bool
- func (d *SkeletonDescriptor) Validate(key string, value *model.ValueSkeleton) error
Constants ¶
const (
// SkeletonDescriptorName is the name of the descriptor skeleton.
SKeletonDescriptorName = "skeleton"
)
Variables ¶
This section is empty.
Functions ¶
func NewSkeletonDescriptor ¶
func NewSkeletonDescriptor(log logging.PluginLogger) *kvs.KVDescriptor
NewSkeletonDescriptor creates a new instance of the descriptor.
Types ¶
type SkeletonDescriptor ¶
type SkeletonDescriptor struct {
// contains filtered or unexported fields
}
SkeletonDescriptor is only a skeleton of a descriptor, which can be used as a starting point to build a new descriptor from.
func (*SkeletonDescriptor) Create ¶
func (d *SkeletonDescriptor) Create(key string, value *model.ValueSkeleton) (metadata interface{}, err error)
Create creates new value.
func (*SkeletonDescriptor) Delete ¶
func (d *SkeletonDescriptor) Delete(key string, value *model.ValueSkeleton, metadata interface{}) error
Delete removes an existing value.
func (*SkeletonDescriptor) Dependencies ¶
func (d *SkeletonDescriptor) Dependencies(key string, value *model.ValueSkeleton) (deps []kvs.Dependency)
Dependencies lists dependencies of the given value.
func (*SkeletonDescriptor) DerivedValues ¶
func (d *SkeletonDescriptor) DerivedValues(key string, value *model.ValueSkeleton) (derived []kvs.KeyValuePair)
DerivedValues breaks the value into multiple part handled/referenced separately.
func (*SkeletonDescriptor) EquivalentValues ¶
func (d *SkeletonDescriptor) EquivalentValues(key string, old, new *model.ValueSkeleton) bool
EquivalentInterfaces compares two revisions of the same value for equality.
func (*SkeletonDescriptor) IsRetriableFailure ¶
func (d *SkeletonDescriptor) IsRetriableFailure(err error) bool
IsRetriableFailure returns true if the given error, returned by one of the CRUD operations, can be theoretically fixed by merely repeating the operation.
func (*SkeletonDescriptor) Retrieve ¶
func (d *SkeletonDescriptor) Retrieve(correlate []adapter.SkeletonKVWithMetadata) (retrieved []adapter.SkeletonKVWithMetadata, err error)
Retrieve retrieves values from SB.
func (*SkeletonDescriptor) Update ¶
func (d *SkeletonDescriptor) Update(key string, old, new *model.ValueSkeleton, oldMetadata interface{}) (newMetadata interface{}, err error)
Update updates existing value.
func (*SkeletonDescriptor) UpdateWithRecreate ¶
func (d *SkeletonDescriptor) UpdateWithRecreate(key string, old, new *model.ValueSkeleton, metadata interface{}) bool
UpdateWithRecreate returns true if value update requires full re-creation.
func (*SkeletonDescriptor) Validate ¶
func (d *SkeletonDescriptor) Validate(key string, value *model.ValueSkeleton) error
Validate validates value before it is applied.