etcdcfg

package
v0.0.0-...-68b4852 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitFlag

func InitFlag()

func UseEtcdConfig

func UseEtcdConfig()

UseEtcdConfig read config from etcd.

Types

type ConfigItem

type ConfigItem struct {
	Value configcentra.ConfigValue
	Ntfs  []configcentra.ConfigUpdateNotify
}

type EtcdConfigBackend

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

func NewEtcdConfigBackend

func NewEtcdConfigBackend(prefix string, timeout time.Duration, setDefault bool) *EtcdConfigBackend

func (*EtcdConfigBackend) Finish

func (svc *EtcdConfigBackend) Finish()

func (*EtcdConfigBackend) GetBool

func (svc *EtcdConfigBackend) GetBool(key string) (_ bool, err error)

func (*EtcdConfigBackend) GetDuration

func (svc *EtcdConfigBackend) GetDuration(key string) (_ time.Duration, err error)

func (*EtcdConfigBackend) GetFloat64

func (svc *EtcdConfigBackend) GetFloat64(key string) (_ float64, err error)

func (*EtcdConfigBackend) GetInt

func (svc *EtcdConfigBackend) GetInt(key string) (_ int, err error)

func (*EtcdConfigBackend) GetInt32

func (svc *EtcdConfigBackend) GetInt32(key string) (_ int32, err error)

func (*EtcdConfigBackend) GetInt64

func (svc *EtcdConfigBackend) GetInt64(key string) (_ int64, err error)

func (*EtcdConfigBackend) GetIntSlice

func (svc *EtcdConfigBackend) GetIntSlice(key string) (vals []int, err error)

func (*EtcdConfigBackend) GetObject

func (svc *EtcdConfigBackend) GetObject(key string, obj interface{}) (err error)

func (*EtcdConfigBackend) GetString

func (svc *EtcdConfigBackend) GetString(key string) (_ string, err error)

func (*EtcdConfigBackend) GetStringSlice

func (svc *EtcdConfigBackend) GetStringSlice(key string) (_ []string, err error)

func (*EtcdConfigBackend) GetTime

func (svc *EtcdConfigBackend) GetTime(key string) (_ time.Time, err error)

func (*EtcdConfigBackend) GetUint

func (svc *EtcdConfigBackend) GetUint(key string) (_ uint, err error)

func (*EtcdConfigBackend) GetUint16

func (svc *EtcdConfigBackend) GetUint16(key string) (_ uint16, err error)

func (*EtcdConfigBackend) GetUint32

func (svc *EtcdConfigBackend) GetUint32(key string) (_ uint32, err error)

func (*EtcdConfigBackend) GetUint64

func (svc *EtcdConfigBackend) GetUint64(key string) (_ uint64, err error)

func (*EtcdConfigBackend) Init

func (svc *EtcdConfigBackend) Init(s app.Stoper) (err error)

func (*EtcdConfigBackend) RegisterConfig

register custom config value

func (*EtcdConfigBackend) SetDefault

func (svc *EtcdConfigBackend) SetDefault(key string, doc string, value interface{})

func (*EtcdConfigBackend) SetObject

func (svc *EtcdConfigBackend) SetObject(key string, doc string, obj interface{})

func (*EtcdConfigBackend) Start

func (svc *EtcdConfigBackend) Start(s app.Stoper) error

func (*EtcdConfigBackend) Stop

func (svc *EtcdConfigBackend) Stop()

func (*EtcdConfigBackend) UseObject

func (svc *EtcdConfigBackend) UseObject() bool

object support

func (*EtcdConfigBackend) WatchConfigUpdate

func (svc *EtcdConfigBackend) WatchConfigUpdate(ntf []configcentra.ConfigUpdateNotify)

watch config update

Jump to

Keyboard shortcuts

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