Documentation ¶
Index ¶
- Variables
- func AddFunc(key string, initFunc InitFunc, watchFunc WatchFunc)
- func Restart()
- func Start()
- type Client
- func (c *Client) AddFunc(key string, initFunc InitFunc, watchFunc WatchFunc)
- func (c *Client) Close() error
- func (c *Client) Ctx() context.Context
- func (c *Client) DelValue(key string) (*clientv3.DeleteResponse, error)
- func (c *Client) DelValueWithPrefix(prefix string) (*clientv3.DeleteResponse, error)
- func (c *Client) GetValue(key string) (*clientv3.GetResponse, error)
- func (c *Client) GetValueWithPrefix(prefix string) (*clientv3.GetResponse, error)
- func (c *Client) Open(etcdUrl []string, userName, passWord string, dialTimeout time.Duration) error
- func (c *Client) PutValue(key, value string) (*clientv3.PutResponse, error)
- func (c *Client) Restart()
- func (c *Client) Start()
- func (c *Client) WatchWithPrefix(prefix string, revision int64) clientv3.WatchChan
- type Configuration
- type InitFunc
- type WatchFunc
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = Configuration{}
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func GlobalClient ¶
func GlobalClient() *Client
func (*Client) DelValueWithPrefix ¶
DelValueWithPrefix 按照前缀删除
func (*Client) GetValueWithPrefix ¶
GetValueWithPrefix 获取前缀
func (*Client) WatchWithPrefix ¶
WatchWithPrefix 监测前缀创建事件
type Configuration ¶
type Configuration struct { Url []string UserName string Password string DialTimeout int // second }
func (*Configuration) Close ¶
func (c *Configuration) Close() error
func (*Configuration) Init ¶
func (c *Configuration) Init() error
func (*Configuration) Name ¶
func (c *Configuration) Name() string
Click to show internal directories.
Click to hide internal directories.