Commit 766406c4 authored by ztelur's avatar ztelur

GetRawClient to getRawClient

parent fa667d37
......@@ -194,7 +194,7 @@ func (c *Client) keepSessionLoop(s *concurrency.Session) {
}
}
func (c *Client) GetRawClient() *clientv3.Client {
func (c *Client) getRawClient() *clientv3.Client {
c.lock.RLock()
defer c.lock.RUnlock()
......@@ -203,7 +203,7 @@ func (c *Client) GetRawClient() *clientv3.Client {
// if k not exist will put k/v in etcd, otherwise return nil
func (c *Client) put(k string, v string, opts ...clientv3.OpOption) error {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return ErrNilETCDV3Client
......@@ -219,7 +219,7 @@ func (c *Client) put(k string, v string, opts ...clientv3.OpOption) error {
// if k not exist will put k/v in etcd
// if k is already exist in etcd, replace it
func (c *Client) update(k string, v string, opts ...clientv3.OpOption) error {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return ErrNilETCDV3Client
......@@ -233,7 +233,7 @@ func (c *Client) update(k string, v string, opts ...clientv3.OpOption) error {
}
func (c *Client) delete(k string) error {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return ErrNilETCDV3Client
......@@ -244,7 +244,7 @@ func (c *Client) delete(k string) error {
}
func (c *Client) get(k string) (string, error) {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return "", ErrNilETCDV3Client
......@@ -264,7 +264,7 @@ func (c *Client) get(k string) (string, error) {
// CleanKV delete all key and value
func (c *Client) CleanKV() error {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return ErrNilETCDV3Client
......@@ -275,7 +275,7 @@ func (c *Client) CleanKV() error {
}
func (c *Client) getChildren(k string) ([]string, []string, error) {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return nil, nil, ErrNilETCDV3Client
......@@ -300,7 +300,7 @@ func (c *Client) getChildren(k string) ([]string, []string, error) {
}
func (c *Client) watchWithPrefix(prefix string) (clientv3.WatchChan, error) {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return nil, ErrNilETCDV3Client
......@@ -310,7 +310,7 @@ func (c *Client) watchWithPrefix(prefix string) (clientv3.WatchChan, error) {
}
func (c *Client) watch(k string) (clientv3.WatchChan, error) {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return nil, ErrNilETCDV3Client
......@@ -320,7 +320,7 @@ func (c *Client) watch(k string) (clientv3.WatchChan, error) {
}
func (c *Client) keepAliveKV(k string, v string) error {
rawClient := c.GetRawClient()
rawClient := c.getRawClient()
if rawClient == nil {
return ErrNilETCDV3Client
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment