Documentation ¶
Index ¶
- func Del(key string) (resp *clientv3.DeleteResponse, err error)
- func DelWithPrefix(key string) (resp *clientv3.DeleteResponse, err error)
- func Get(key string, opts ...clientv3.OpOption) (rsp *clientv3.GetResponse, err error)
- func GetArray(key string) (data []string)
- func GetMap(key string) (data map[string]string)
- func GetString(key string) string
- func Init(conf Config)
- func RegisterService(key, val string) (err error)
- func Set(key, val string) (resp *clientv3.PutResponse, err error)
- func SetTTL(key, val string, ttl int64) (resp *clientv3.PutResponse, err error)
- func SetTTLWithPrevKV(key, val string, ttl int64) (resp *clientv3.PutResponse, err error)
- func SetWithPrevKV(key, val string) (resp *clientv3.PutResponse, err error)
- func Watch(key string) <-chan []string
- type Client
- func (cli *Client) Del(key string, opts ...clientv3.OpOption) (resp *clientv3.DeleteResponse, err error)
- func (cli *Client) DelWithPrefix(key string) (resp *clientv3.DeleteResponse, err error)
- func (cli *Client) Get(key string, opts ...clientv3.OpOption) (resp *clientv3.GetResponse, err error)
- func (cli *Client) GetArray(key string) (data []string)
- func (cli *Client) GetMap(key string) (data map[string]string)
- func (cli *Client) GetString(key string) string
- func (cli *Client) RegisterService(serviceName, addr string) (err error)
- func (cli *Client) Set(key, val string, opts ...clientv3.OpOption) (resp *clientv3.PutResponse, err error)
- func (cli *Client) SetTTL(key, val string, ttl int64, opts ...clientv3.OpOption) (resp *clientv3.PutResponse, err error)
- func (cli *Client) SetTTLWithPrevKV(key, val string, ttl int64) (resp *clientv3.PutResponse, err error)
- func (cli *Client) SetWithPrevKV(key, val string) (resp *clientv3.PutResponse, err error)
- func (cli *Client) Watch(key string) <-chan []string
- type Config
- type TLS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DelWithPrefix ¶ added in v1.1.1
func DelWithPrefix(key string) (resp *clientv3.DeleteResponse, err error)
func RegisterService ¶ added in v1.1.1
func SetTTL ¶ added in v1.1.1
func SetTTL(key, val string, ttl int64) (resp *clientv3.PutResponse, err error)
func SetTTLWithPrevKV ¶ added in v1.1.1
func SetTTLWithPrevKV(key, val string, ttl int64) (resp *clientv3.PutResponse, err error)
func SetWithPrevKV ¶ added in v1.1.1
func SetWithPrevKV(key, val string) (resp *clientv3.PutResponse, err error)
Types ¶
type Client ¶
func (*Client) Del ¶
func (cli *Client) Del(key string, opts ...clientv3.OpOption) (resp *clientv3.DeleteResponse, err error)
del key and return previous key-value
func (*Client) DelWithPrefix ¶ added in v1.1.1
func (cli *Client) DelWithPrefix(key string) (resp *clientv3.DeleteResponse, err error)
del prefix key and return previous key-value
func (*Client) Get ¶
func (cli *Client) Get(key string, opts ...clientv3.OpOption) (resp *clientv3.GetResponse, err error)
get value by key
func (*Client) RegisterService ¶ added in v1.1.1
register service and keepalive
func (*Client) Set ¶
func (cli *Client) Set(key, val string, opts ...clientv3.OpOption) (resp *clientv3.PutResponse, err error)
set key-value
func (*Client) SetTTL ¶ added in v1.1.1
func (cli *Client) SetTTL(key, val string, ttl int64, opts ...clientv3.OpOption) (resp *clientv3.PutResponse, err error)
set key-value-ttl
func (*Client) SetTTLWithPrevKV ¶ added in v1.1.1
func (cli *Client) SetTTLWithPrevKV(key, val string, ttl int64) (resp *clientv3.PutResponse, err error)
set key-value-ttl and return previous key-value
func (*Client) SetWithPrevKV ¶ added in v1.1.1
func (cli *Client) SetWithPrevKV(key, val string) (resp *clientv3.PutResponse, err error)
set key-value and return previous key-value
Click to show internal directories.
Click to hide internal directories.