config

package
v1.1.31 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close added in v1.0.6

func Close()

func DecodePrivate added in v0.2.4

func DecodePrivate(key string, v interface{}) error

DecodePrivate decode data to config and config will be updated when etcd watch change.

func DecodePublic added in v0.2.4

func DecodePublic(key string, v interface{}) error

DecodePublic decode data to config and config will be updated when etcd watch change.

func NewConfig

func NewConfig(opts ...Options) error

func PutPrivate added in v1.0.6

func PutPrivate(key, value string) error

PutPrivate put private key value to etcd and cache data

func PutPublic added in v1.0.6

func PutPublic(key, value string) error

PutPublic put public key value to etcd and cache data

Types

type Option

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

type Options

type Options func(option *Option)

func Backup

func Backup(path string) Options

func Chaos added in v0.2.3

func Chaos(f ...func() error) Options

Chaos is config already setup and do Chaos functions

func DisableDynamic

func DisableDynamic() Options

func LocalFile

func LocalFile() Options

func LogOut added in v1.0.4

func LogOut() Options

func Prefix

func Prefix(prefix string) Options

func Private

func Private(private string) Options

func Public

func Public(public string) Options

func Schema

func Schema(schema string) Options

func Version

func Version(version string) Options

Jump to

Keyboard shortcuts

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