Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
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
d89b7a25
Commit
d89b7a25
authored
Apr 26, 2021
by
Randy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix ci error
parent
703d766f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
client.go
database/kv/etcd/v3/client.go
+2
-2
client_test.go
database/kv/etcd/v3/client_test.go
+2
-2
No files found.
database/kv/etcd/v3/client.go
View file @
d89b7a25
...
...
@@ -36,7 +36,7 @@ var (
ErrNilETCDV3Client
=
perrors
.
New
(
"etcd raw client is nil"
)
// full describe the ERR
// ErrKVPairNotFound not found key
ErrKVPairNotFound
=
perrors
.
New
(
"k/v pair not found"
)
// ErrKVListSizeIllegal
not found k/v list
// ErrKVListSizeIllegal
k/v list empty or not equal size
ErrKVListSizeIllegal
=
perrors
.
New
(
"k/v List is empty or kList size not equal to vList size"
)
// ErrCompareFail txn compare fail
ErrCompareFail
=
perrors
.
New
(
"txn compare fail"
)
...
...
@@ -306,7 +306,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 and revision
<
= revision, replace it, otherwise return ErrCompareFail
// if k is already exist in etcd and revision = revision, replace it, otherwise return ErrCompareFail
func
(
c
*
Client
)
updateWithRev
(
k
string
,
v
string
,
rev
int64
,
opts
...
clientv3
.
OpOption
)
error
{
rawClient
:=
c
.
GetRawClient
()
...
...
database/kv/etcd/v3/client_test.go
View file @
d89b7a25
...
...
@@ -297,7 +297,7 @@ func (suite *ClientTestSuite) TestClientWatch() {
c
.
Close
()
}()
wc
,
err
:=
c
.
watch
(
prefix
)
wc
,
err
:=
c
.
watch
WithOption
(
prefix
)
if
err
!=
nil
{
assert
.
Error
(
t
,
err
)
}
...
...
@@ -338,7 +338,7 @@ func (suite *ClientTestSuite) TestClientRegisterTemp() {
}()
completePath
:=
path
.
Join
(
"scott"
,
"wang"
)
wc
,
err
:=
observeC
.
watch
(
completePath
)
wc
,
err
:=
observeC
.
watch
WithOption
(
completePath
)
if
err
!=
nil
{
assert
.
Error
(
t
,
err
)
}
...
...
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