optimistic_locking_store

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrRecordVersionChanged = errors.New("record version changed")

Functions

func IsErrRecordVersionChanged

func IsErrRecordVersionChanged(err error) bool

Types

type InMemoryStore

type InMemoryStore struct {
	Mux    sync.Mutex
	Values map[string]*Value
}

func NewInMemoryStore

func NewInMemoryStore() *InMemoryStore

func (*InMemoryStore) GetValue

func (store *InMemoryStore) GetValue(key string) (*Value, error)

func (*InMemoryStore) PutValue

func (store *InMemoryStore) PutValue(key string, value *Value) error

type KubernetesResourceAnnotationsStore

type KubernetesResourceAnnotationsStore struct {
	KubernetesInterface dynamic.Interface
	GVR                 schema.GroupVersionResource
	ResourceName        string
	Namespace           string
}

func NewKubernetesResourceAnnotationsStore

func NewKubernetesResourceAnnotationsStore(kubernetesInterface dynamic.Interface, gvr schema.GroupVersionResource, resourceName, namespace string) *KubernetesResourceAnnotationsStore

func (*KubernetesResourceAnnotationsStore) GetValue

func (store *KubernetesResourceAnnotationsStore) GetValue(key string) (*Value, error)

func (*KubernetesResourceAnnotationsStore) PutValue

func (store *KubernetesResourceAnnotationsStore) PutValue(key string, value *Value) error

type OptimisticLockingStore

type OptimisticLockingStore interface {
	GetValue(key string) (*Value, error)
	PutValue(key string, value *Value) error
}

type Value

type Value struct {
	Data string
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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