Piotr Tabor
45e4306508
client: Move client to client/v2 as a module.
...
We make v2 client code a module go.etcd.io/etcd/client/v2.
Pretty mechanical change that can be summarized as:
mkdir client/v2
cd client/v2 && git mod init go.etcd.io/etcd/client/v2
git mv client/*.go client/v2/
find -name '*.go' | xargs sed -i --follow-symlinks 's|/v3/client["]|/client/v2\"|g'
+ fixing changelog, bom, go.mod etc.
2020-10-15 14:39:43 +02:00
Piotr Tabor
de55bb6331
pkg: Rename imports after making 'pkg' a module
...
find -name '*.go' | xargs sed --follow-symlinks -i 's|go.etcd.io/etcd/v3/pkg/|go.etcd.io/etcd/pkg/v3/|g'
go fmt ./...
2020-10-13 00:09:27 +02:00
Piotr Tabor
28f2b07623
*: Update references to code moved to the api/ dir.
...
Follow up to file-moves done in the previous commit.
The commit contains purely mechanical consequences of execution (apart
of scripts/genproto.sh):
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/v3rpc/rpctypes|v3/api/v3rpc/rpctypes|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/version|v3/api/version|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/mvcc/mvccpb|v3/api/mvccpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/etcdserverpb|v3/api/etcdserverpb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/etcdserver/api/membership/membershippb|v3/api/membershippb|g'
% find ./ -name '*.go' | xargs sed --follow-symlinks -i 's|v3/auth/authpb|v3/api/authpb|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/mvcc/mvccpb/kv.proto|/api/mvccpb/kv.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/auth/authpb/auth.proto|/api/authpb/auth.proto|g'
% find ./ -name '*.proto' -o -name '*.md' | xargs -L 1 sed --follow-symlinks -i 's|/etcdserver/api/membership/membershippb/membership.proto|/api/membershippb/membership.proto|g'
I also modified manually paths in scripts/genproto.sh.
% go fmt ./...
2020-10-06 11:56:16 +02:00
Piotr Tabor
7c880e5263
etcdctl: Rename Start / StartWithErrors to MustStart
2020-09-09 19:32:50 +02:00
Piotr Tabor
c32180d772
tests/e2e,etcdctl,etcdmain: Fix go test --tags cov -v ./tests/e2e
...
This CL fixes:
COVERDIR=./coverage PASSES="build_cov" && go test --tags cov -v ./tests/e2e
and is part of the effort to make:
COVERDIR=coverage PASSES="build_cov cov" ./test
fully pass.
The args passed to ./bin/etcd_test and ./bin/etcdctl_test binaries were
mismatched. The protocol of passing the arguments using
environment variables has been replaces with proper passing of flags.
How the measurement of coverage by e2e tests works:
1. COVERDIR=./coverage PASSES="build_cov" are generating
./bin/etcd_test and ./bin/etcdctl_test binaries.
2. These binaries are tests (as coverage can be computed only for
tests) [see ./main_test.go ./etcdctl/main_test.go], but this tests are
running the main logic of the server and uppon termination (or SIGTERM
signal) are writting proper .coverprofile files in the $COVERDIR folder.
The binaries used to take arguments using env variables, but its not
needed any longer. The binaries can consume any command line arguments
that either test (so --test.fooo) or the original binary can consume.
3. The tests/e2e (when compiled with the --tags cov) are starting the
_test binaries instead of the original binaries, such that the coverage
is being collected.
2020-09-09 12:56:15 +02:00
Brandon Philips
96cce208c2
go.mod: use go.etcd.io/etcd/v3 versioning
...
This change makes the etcd package compatible with the existing Go
ecosystem for module versioning.
Used this tool to update package imports:
https://github.com/KSubedi/gomove
2020-04-28 00:57:35 +00:00
Sahdev P. Zala
acb33a5f3f
etcdctl: use appropriate type conversion
...
index variable is being passed as uint64 so we shouldn't use Int.
Also the if loop is redundant so remove it.
2020-02-08 22:01:20 -05:00
Gyuho Lee
34bd797e67
*: revert module import paths
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2019-05-28 15:39:35 -07:00
shivaramr
9150bf52d6
go modules: Fix module path version to include version number
2019-04-26 15:29:50 -07:00
Iskander Sharipov
48a2442fd7
etcdctl: fix strings.HasPrefix args order
...
Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
2019-02-02 02:39:27 +03:00
Shin'ya Ueoka
aa4313a55a
*: fix github links
2018-11-10 11:14:18 +09:00
Sam Batschelet
fa35126ef8
*: add client support for discovery-srv-name
...
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
2018-11-09 10:13:04 -05:00
Gyuho Lee
8db439d693
*: use "go.etcd.io/bbolt"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-29 12:31:28 -07:00
Gyuho Lee
0ef9ef3c74
*: rerun "gofmt"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 18:25:39 -07:00
Gyuho Lee
d37f1521b7
*: update import paths to "go.etcd.io/etcd"
...
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Iskander Sharipov
3da90b6d3e
etcdctl/ctlv2/command: fix type switch case order
...
Since syscall.Errno implements net.Error and all cases
are matched sequentially, it's a mistake to put syscall.Errno
case after net.Error since it will never be executed.
This change swaps syscall.Errno case with net.Error
to give that clause chance to execute.
2018-07-28 23:33:13 +03:00
Vimal K
25bc65794f
etcdctl/ctlv3: etcd v3.4 makes ETCDCTL_API=3 by default
2018-05-29 06:27:20 +05:30
Gyuho Lee
9149565cb3
*: move to "etcdserver/api/membership"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-21 10:31:16 -07:00
Gyuho Lee
4d80753804
etcdctl: rename internal snapshot packages
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-05-21 07:45:34 -07:00
Gyuho Lee
6dbce6b9a4
clientv3,etcdctl: support structured logger
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-04-16 17:36:00 -07:00
Gyuho Lee
aece63b10e
etcdctl: use "TrustedCAFile"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-03-20 15:31:32 -07:00
Gyuho Lee
9b5d6edc4b
*: revert "internal/raftsnap"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
0850ccbf45
*: revert "internal/version" change
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-26 17:11:40 -08:00
Gyuho Lee
c0910085f5
ctlv2: fix govet -shadow warning
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-02-21 10:20:54 -08:00
Gyuho Lee
37546f74ab
*: move "version" to "internal/version"
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-29 10:00:20 -08:00
Gyuho Lee
dee39bf786
internal/raftsnap: move "raftsnap" to internal
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:36:04 -08:00
Gyuho Lee
2b6fd3094f
*: rename "snap" to "raftsnap" package
...
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-01-24 10:26:07 -08:00
Gyu-Ho Lee
f65aee0759
*: replace 'golang.org/x/net/context' with 'context'
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-09-07 13:39:42 -07:00
Anthony Romano
9f7375c225
ctlv2: save v3 db with v2 data using --with-v3
...
Also strips out v3 data if not given --with-v3.
2017-08-31 22:57:41 -07:00
Anthony Romano
ad0b3cfdab
ctlv2: report unhealthy in cluster-health if any node is unavailable
...
Fixes #8061 and #7032
2017-06-09 10:57:17 -07:00
Anthony Romano
dac2c10ce9
etcdctl, e2e: use 0xe7cd as argument separator in cov-enabled etcdctl
...
Fixes #7980
2017-05-25 16:11:52 -07:00
Anthony Romano
2f1542c06d
*: use filepath.Join for files
2017-03-16 07:46:06 -07:00
Gyu-Ho Lee
3d75395875
*: remove never-unused vars, minor lint fix
...
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-03-06 14:59:12 -08:00
fanmin shi
f76ca01aed
etcdctl: show warning if ETCDCTL_API is not set in v2 --help
...
FIXES #7385
2017-03-01 11:29:59 -08:00
fanmin shi
aca4ea2a29
etcdctl: modify etcdctl v2 and v3 for code coverage
2017-02-28 14:50:27 -08:00
Anthony Romano
5559a026d7
etcdctl: remove GetUser check before mutable commands
...
etcdctl was checking if the user exists before applying mutable calls;
if etcdctl contacts a minority member, the member may not know the user
exists on the cluster yet, causing command failure when it should succeed.
If the user does not exist, it will be picked up once the command goes
through raft.
Fixes #6932
2016-12-05 12:12:06 -08:00
Gyu-Ho Lee
9b470ef4c0
etcdctl/ctlv2: error handling with JSON
2016-11-01 20:59:13 -07:00
joshrosso
e489229153
etcdctl: add ttl unit to flag description
...
Add the ttl unit (seconds) to --ttl description for etcdctl's mk, mkdir, set,
setdir, update, and updatedir commands.
2016-10-25 17:12:15 -07:00
sharat
75f812eaa3
etcdctlv2: windows compatibility issue fix for etcd v3.0.1
2016-10-07 22:15:30 +05:30
Anthony Romano
e218834b58
etcdctl: set ServerName for TLS when using --discovery-srv
2016-08-03 22:28:03 -07:00
jesse.millan
205f10aeb6
etcdctl: Add support for formating output of key related commands
...
All v2 key and dir related commands will now honor the global format option if
it was specified. Otherwise, the output will remain the same.
2016-07-27 14:17:19 -07:00
jesse.millan
f18d5433cc
etcdctl: Add support for formating output of ls command in json
...
The ls command will check for and honor json or extended output formats.
Fixes #5993
2016-07-20 18:05:23 -07:00
Anthony Romano
97ff1abb3e
etcdctl: remove 0.4 import command
2016-07-13 15:30:37 -07:00
Anthony Romano
439b96f090
etcdctl: remove 0.4 peer syncing
2016-07-13 15:26:25 -07:00
Danny Sauer
a998fb4af1
etcdctl: index is incremented in Watcher; remove double-increment
2016-06-23 08:54:34 -05:00
Gyu-Ho Lee
5720fe812e
etcdctl: use CreateDirAll
2016-06-22 15:55:56 -07:00
Gyu-Ho Lee
bdca594495
etcdctl/ctlv2: use latest Action interface
2016-06-20 16:34:28 -07:00
Gyu-Ho Lee
0ae9d444f9
ctlv2: use urfave/cli in ctlv2
2016-06-20 15:17:03 -07:00
Gyu-Ho Lee
1e38ab1706
etcdctl: print API version (v2, v3 separate)
2016-06-14 15:33:39 -07:00
Katsuyuki Tateishi
8b75a33398
*: replace '-' with '--' for long options
...
A long option should have double dashes (cf. #4595 ),
so are error messages.
2016-06-06 12:25:45 +09:00