kv

package
v1.7.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrKeyNotFound is an error meant when a key doesn't exists in the
	// storage backend
	ErrKeyNotFound = errors.New("key not found")
)

Functions

This section is empty.

Types

type Consul

type Consul struct {
	// contains filtered or unexported fields
}

Consul is an implementation of a KV store which uses Consul as it's backend

func (*Consul) Get

func (c *Consul) Get(key string) (string, error)

type Store

type Store interface {
	Get(key string) (string, error)
}

Store is a standard interface to a KV backend

func NewConsul

func NewConsul(conf config.ConsulConfig) (Store, error)

NewConsul returns a configured consul KV store adapter

func NewVault

func NewVault(conf config.VaultConfig) (Store, error)

NewVault returns a configured vault KV store adapter

type Vault

type Vault struct {
	// contains filtered or unexported fields
}

Vault is an implementation of a KV store which uses Consul as it's backend

func (*Vault) Get

func (v *Vault) Get(key string) (string, error)

Jump to

Keyboard shortcuts

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