kv

package
v3.0.13+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2018 License: Apache-2.0 Imports: 12 Imported by: 6 modules, 21 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

func GetValue

func GetValue(key string) (value string, 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, 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