descriptor

package
v2.2.0-alpha+incompatible Latest Latest
Warning

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

Go to latest
Published: May 9, 2019 License: Apache-2.0 Imports: 6 Imported by: 9

Documentation

Index

Constants

View Source
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 *metaidx.SkeletonMetadata, err error)

Create creates new value.

func (*SkeletonDescriptor) Delete

func (d *SkeletonDescriptor) Delete(key string, value *model.ValueSkeleton, metadata *metaidx.SkeletonMetadata) 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) MetadataMapFactory

func (d *SkeletonDescriptor) MetadataMapFactory() idxmap.NamedMappingRW

MetadataMapFactory is a factory for index-map with skeleton metadata.

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 *metaidx.SkeletonMetadata) (newMetadata *metaidx.SkeletonMetadata, err error)

Update updates existing value.

func (*SkeletonDescriptor) UpdateWithRecreate

func (d *SkeletonDescriptor) UpdateWithRecreate(key string, old, new *model.ValueSkeleton, metadata *metaidx.SkeletonMetadata) 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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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