Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gostnops
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wei.xuan
gostnops
Commits
437a6423
Commit
437a6423
authored
Mar 08, 2021
by
wangwx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
export interface for user use
parent
fd94fb87
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
client.go
database/kv/etcd/v3/client.go
+7
-2
No files found.
database/kv/etcd/v3/client.go
View file @
437a6423
...
...
@@ -137,6 +137,11 @@ func (c *Client) stop() bool {
}
// Close close client
func
(
c
*
Client
)
GetCtx
()
context
.
Context
{
return
c
.
ctx
}
// Close close client
func
(
c
*
Client
)
Close
()
{
if
c
==
nil
{
return
...
...
@@ -274,7 +279,7 @@ func (c *Client) CleanKV() error {
return
err
}
func
(
c
*
Client
)
g
etChildren
(
k
string
)
([]
string
,
[]
string
,
error
)
{
func
(
c
*
Client
)
G
etChildren
(
k
string
)
([]
string
,
[]
string
,
error
)
{
rawClient
:=
c
.
getRawClient
()
if
rawClient
==
nil
{
...
...
@@ -389,7 +394,7 @@ func (c *Client) RegisterTemp(k, v string) error {
// GetChildrenKVList gets children kv list by @k
func
(
c
*
Client
)
GetChildrenKVList
(
k
string
)
([]
string
,
[]
string
,
error
)
{
kList
,
vList
,
err
:=
c
.
g
etChildren
(
k
)
kList
,
vList
,
err
:=
c
.
G
etChildren
(
k
)
return
kList
,
vList
,
perrors
.
WithMessagef
(
err
,
"get key children (key %s)"
,
k
)
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment