etcd_config

package
v0.0.0-...-50e54af Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config interface {
	GetConfigKey() string
	LoadConfig(value []byte)
}

type EtcdCfg

type EtcdCfg struct {
	CFG     Config
	ETCDCli *clientv3.Client
	Watcher clientv3.Watcher
}

todo close

func InitEtcdCfg

func InitEtcdCfg(config Config) (*EtcdCfg, error)

func (*EtcdCfg) Close

func (ecf *EtcdCfg) Close() error

func (*EtcdCfg) Load

func (ecf *EtcdCfg) Load(ctx context.Context) error

func (*EtcdCfg) Save

func (ecf *EtcdCfg) Save(ctx context.Context, value []byte) error

func (*EtcdCfg) Watch

func (ecf *EtcdCfg) Watch()

Jump to

Keyboard shortcuts

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