etcdconfig

package module
v0.0.0-...-e9bac88 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: MPL-2.0 Imports: 11 Imported by: 1

README

etcdconfig

Golang package with helper functions to store/fetch configuration data on an Etcd cluster

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrIndex = errors.New("Error invalid index.")

Functions

func DeleteConfig

func DeleteConfig(etcdcli etcd.Client, key string) error

func GetConfig

func GetConfig(etcdcli etcd.Client, key string) (interface{}, interface{}, error)

func OnUpdate

func OnUpdate(etcdCli etcd.Client, key string, fn func(val string), id ...interface{})

func OnUpdateIFace

func OnUpdateIFace(etcdCli etcd.Client, key string, fn func(val interface{}), id ...interface{})

func OnUpdateTree

func OnUpdateTree(etcdCli etcd.Client, key string, fn func(key string, val interface{}, action string), id ...interface{})

func Set

func Set(etcdcli etcd.KeysAPI, path, key, typ string) error

func SetConfig

func SetConfig(cfg string, etcdcli etcd.Client, key string) error

func SetConfigFromMap

func SetConfigFromMap(config map[string]interface{}, etcdcli etcd.Client, key string) error

func SetConfigFromReader

func SetConfigFromReader(cfg io.Reader, etcdcli etcd.Client, key string) error

func SetKey

func SetKey(etcdcli etcd.Client, key string, value string) error

Types

type EtcdconfigG

type EtcdconfigG struct {
	Setter  goose.Alert
	Getter  goose.Alert
	Updater goose.Alert
}
var Goose EtcdconfigG

Jump to

Keyboard shortcuts

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