etcd

package
v0.0.0-...-599ae38 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

* Copyright FMR LLC <opensource@fidelity.com> * * SPDX-License-Identifier: Apache

Index

Constants

View Source
const (
	THELIV_CONFIG_KEY            string = "/theliv/config"
	DATADOG_CONFIG_KEY           string = "/theliv/config/datadog"
	THELIV_AUTH_KEY              string = "/theliv/config/authconf"
	CLUSTERS_KEY                 string = "/theliv/clusters"
	PROMETHEUS_GLOBAL_CONFIG_KEY string = "/theliv/config/prometheus"
	THELIV_LEVEL_CONFIG_KEY      string = "/theliv/config/levelconf"
	LDAP_CONFIG_KEY              string = "/theliv/config/ldap"
)

Variables

This section is empty.

Functions

func Get

func Get(ctx context.Context, key string) ([]byte, error)

Get content from key directly

func GetKeys

func GetKeys(ctx context.Context, prefix string) ([]string, error)

Get keys only with prefix

func GetObject

func GetObject(key string, value interface{}) error

Get object (struct) from etcd, assume all the data in etcd should be in json format value should be a pointer

func GetObjectWithSub

func GetObjectWithSub(ctx context.Context, key string, obj interface{}) error

Get the json value of the key, also the sub paths Adding the sub values to parent, ASSUME the type of sub is []byte

func GetWithPrefix

func GetWithPrefix(pre string) (map[string][]byte, error)

Get both keys and values start with prefix

func InitClientConfig

func InitClientConfig(ca string, cert string, key string, endpoints []string)

Init client config, could be called only once, before any other functions

func Put

func Put(key string, value interface{}) error

Marshall the value (struct) and put to etcd

func PutStr

func PutStr(key, value string) error

Put KV to etcd

Types

This section is empty.

Jump to

Keyboard shortcuts

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