db

package
v0.0.0-...-6a90541 Latest Latest
Warning

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

Go to latest
Published: Mar 19, 2020 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultEtcdEndpoint = "localhost:2379"

Variables

This section is empty.

Functions

func InitKV

func InitKV() error

Types

type EtcdClient

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

func NewEtcdClient

func NewEtcdClient(endpoints []string) (*EtcdClient, error)

func (*EtcdClient) Delete

func (c *EtcdClient) Delete(key string) (string, error)

func (*EtcdClient) Get

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

func (*EtcdClient) List

func (c *EtcdClient) List(prefix string) (map[string]string, error)

func (*EtcdClient) Set

func (c *EtcdClient) Set(key string, value string) error

type KVStorage

type KVStorage interface {
	Get(string) (string, error)
	Set(string, string) error
	List(string) (map[string]string, error)
	Delete(string) (string, error)
}
var KV KVStorage

Jump to

Keyboard shortcuts

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