etcd

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	*clientv3.Client
}

Client .

func NewClient

func NewClient(dialTimeout time.Duration) (*Client, error)

NewClient .

func (*Client) GetEtcdKey

func (e *Client) GetEtcdKey(profile, appName, item string) string

GetEtcdKey etcd key

func (*Client) GetValue

func (e *Client) GetValue(dailTimeout time.Duration, key string, value interface{}) error

GetValue Get a key

func (*Client) SyncKey

func (e *Client) SyncKey(requestTimeout time.Duration, key string, value []byte) error

SyncKey sync yaml content to etcd

func (*Client) WatchKey

func (e *Client) WatchKey(key string, config interface{}, initClient InitClient)

WatchKey .

type InitClient

type InitClient func()

InitClient init client by remote changed config

Jump to

Keyboard shortcuts

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