kvstore

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AwaitingReconnectionKey added in v0.10.0

type AwaitingReconnectionKey struct {
	OrgID      uuid.UUID
	DeviceName string
}

func (*AwaitingReconnectionKey) ComposeKey added in v0.10.0

func (a *AwaitingReconnectionKey) ComposeKey() string

type DeviceKey added in v0.10.0

type DeviceKey struct {
	OrgID      uuid.UUID
	DeviceName string
}

func (*DeviceKey) ComposeKey added in v0.10.0

func (d *DeviceKey) ComposeKey() string

type GitContentsKey

type GitContentsKey struct {
	OrgID           uuid.UUID
	Fleet           string
	TemplateVersion string
	Repository      string
	TargetRevision  string
	Path            string
}

func (*GitContentsKey) ComposeKey

func (k *GitContentsKey) ComposeKey() string

type GitRevisionKey

type GitRevisionKey struct {
	OrgID           uuid.UUID
	Fleet           string
	TemplateVersion string
	Repository      string
	TargetRevision  string
}

func (*GitRevisionKey) ComposeKey

func (k *GitRevisionKey) ComposeKey() string

type HttpKey

type HttpKey struct {
	OrgID           uuid.UUID
	Fleet           string
	TemplateVersion string
	URL             string
}

func (*HttpKey) ComposeKey

func (k *HttpKey) ComposeKey() string

type K8sSecretKey

type K8sSecretKey struct {
	OrgID           uuid.UUID
	Fleet           string
	TemplateVersion string
	Namespace       string
	Name            string
}

func (*K8sSecretKey) ComposeKey

func (k *K8sSecretKey) ComposeKey() string

type KVStore

type KVStore interface {
	Close()
	SetNX(ctx context.Context, key string, value []byte) (bool, error)
	SetIfGreater(ctx context.Context, key string, newVal int64) (bool, error)
	Get(ctx context.Context, key string) ([]byte, error)
	GetOrSetNX(ctx context.Context, key string, value []byte) ([]byte, error)
	DeleteKeysForTemplateVersion(ctx context.Context, key string) error
	DeleteAllKeys(ctx context.Context) error
	PrintAllKeys(ctx context.Context) // For debugging
}

func NewKVStore

func NewKVStore(ctx context.Context, log logrus.FieldLogger, hostname string, port uint, password api.SecureString) (KVStore, error)

type RepositoryUrlKey

type RepositoryUrlKey struct {
	OrgID           uuid.UUID
	Fleet           string
	TemplateVersion string
	Repository      string
}

func (*RepositoryUrlKey) ComposeKey

func (k *RepositoryUrlKey) ComposeKey() string

type TemplateVersionKey

type TemplateVersionKey struct {
	OrgID           uuid.UUID
	Fleet           string
	TemplateVersion string
}

func (*TemplateVersionKey) ComposeKey

func (k *TemplateVersionKey) ComposeKey() string

Jump to

Keyboard shortcuts

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