kv

package
v0.12.4 Latest Latest
Warning

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

Go to latest
Published: May 20, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DistributePairs

func DistributePairs(kvPairs [](*KVPair)) (err error)

func GetValue

func GetValue(key string) (value string, found bool, err error)

func InitKVStores

func InitKVStores()

InitKVStores initializes the KV stores (duh), once in the lifetime of this app. Configuration reload does not affect a running instance.

func PutKVPair

func PutKVPair(kvPair *KVPair) (err error)

func PutValue

func PutValue(key string, value string) (err error)

Types

type KVPair

type KVPair struct {
	Key   string
	Value string
}

func NewKVPair

func NewKVPair(key string, value string) *KVPair

func (*KVPair) String

func (this *KVPair) String() string

type KVStore

type KVStore interface {
	PutKeyValue(key string, value string) (err error)
	GetKeyValue(key string) (value string, found bool, err error)
	DistributePairs(kvPairs [](*KVPair)) (err error)
}

func NewConsulStore

func NewConsulStore() KVStore

NewConsulStore creates a new consul store. It is possible that the client for this store is nil, which is the case if no consul config is provided.

func NewInternalKVStore

func NewInternalKVStore() KVStore

func NewZkStore

func NewZkStore() KVStore

Jump to

Keyboard shortcuts

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