kvstore

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2025 License: Apache-2.0 Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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 config.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