config

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2019 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EtcdConfig

type EtcdConfig struct {
	Name string
	// contains filtered or unexported fields
}

EtcdConfig etcd config

func NewEtcdConfig

func NewEtcdConfig(uri string) (etcdConfig *EtcdConfig, err error)

NewEtcdConfig new etcd config

func (*EtcdConfig) Close

func (ec *EtcdConfig) Close() error

Close close the client

func (*EtcdConfig) ReadConfig

func (ec *EtcdConfig) ReadConfig() (data []byte, err error)

ReadConfig read config

func (*EtcdConfig) Watch

func (ec *EtcdConfig) Watch(fn func())

Watch watch the config change

func (*EtcdConfig) WriteConfig

func (ec *EtcdConfig) WriteConfig(data []byte) (err error)

WriteConfig write config

type ReadWriter

type ReadWriter interface {
	ReadConfig() ([]byte, error)
	WriteConfig([]byte) error
	Watch(func())
	Close() error
}

ReadWriter config reader writer

Jump to

Keyboard shortcuts

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