Commit Graph

78 Commits (bc9e433ca26be0314a37c8c6ead66429a584bbc9)

Author SHA1 Message Date
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
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
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
Shin'ya Ueoka aa4313a55a *: fix github links 2018-11-10 11:14:18 +09:00
Joe Betz 49450aaa60
clientv3: Clarify lessor KeepAlive docs 2018-10-11 15:11:28 -07:00
Gyuho Lee 07fcc26799 *: fix gofmt warnings with Go 1.11
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 21:45:24 -07:00
Gyuho Lee 2ac04381a2 clientv3: update Go import paths to "go.etcd.io"
Signed-off-by: Gyuho Lee <leegyuho@amazon.com>
2018-08-28 17:47:55 -07:00
Gyuho Lee 0458c5d54b
Merge pull request #9951 from gyuho/revive
*: integrate https://github.com/mgechev/revive with fmt tests
2018-07-23 06:39:33 -07:00
Gyuho Lee e93fb56037 clientv3: clean up variables, add response dropping warning
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-22 17:59:38 -07:00
Gyuho Lee f3385418bb clientv3: fix keepalive send interval when response queue is full
client should update next keepalive send time
even when lease keepalive response queue becomes full.

Otherwise, client sends keepalive request every 500ms
regardless of TTL when the send is only expected to happen
with the interval of TTL / 3 at minimum.

Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-22 17:59:32 -07:00
Gyuho Lee 90a5da18cf clientv3: clean up code format
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2018-07-21 16:03:12 -07:00
Joe Betz a5b2fb5563 clientv3: Introduce custom retry interceptor based on go-grpc-middleware/retry 2018-06-15 13:41:28 -07:00
Gyuho Lee 497412c588 clientv3: call other APIs with default gRPC call options
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-20 10:58:05 -08:00
Gyuho Lee 3e58dd707f clientv3: document lease KeepAlive streaming errors
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>
2017-12-18 10:19:41 -08:00
Anthony Romano da3e3b7240 clientv3: document from "don't halt lease client if there is a lease error"
From https://github.com/coreos/etcd/pull/7866.
2017-12-18 09:55:00 -08:00
Sam Batschelet a5d9bff24c clientv3/lease.go: TTL, document expired Lease. 2017-12-18 08:34:19 -05:00
Gyu-Ho Lee 29aa4ce2a1 clientv3: remove redundant retries in Lease, set FailFast=true
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-10-19 14:53:01 -07: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 2d0eec0b35 clientv3: goword spelling check 2017-09-06 22:11:33 -07:00
Gyu-Ho Lee 15ef98a4ee clientv3: implement LeaseLeases API
Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-08-14 14:18:56 -07:00
Gyu-Ho Lee 5e059fd8dc *: use metadata Incoming/OutgoingContext
Fix https://github.com/coreos/etcd/issues/7888.

Signed-off-by: Gyu-Ho Lee <gyuhox@gmail.com>
2017-06-15 16:41:23 -07:00
fanmin shi 4dff7aaa2a clientv3: change keepAlive Close() to close()
keepAlive is a private struct that belongs to clientv3 pkg and shouldn't expose a public Close() method.
2017-06-08 11:53:59 -07:00
Iwasaki Yudai aa85b0cea7 clientv3: Do no stop keep alive loop by server side errors 2017-05-08 15:47:34 -07:00
Anthony Romano 6dd8fb6f24 Revert "Merge pull request #7732 from heyitsanthony/lease-err-ka"
This reverts commit fbbc4a4979, reversing
changes made to f254e38385.

Fixes #7851
2017-05-02 09:36:16 -07:00
Anthony Romano d5f414f69b clientv3: don't halt lease client if there is a lease error
Fixes #7488
2017-04-24 23:49:44 -07:00
Anthony Romano 8024a0d15f clientv3: support WithRequireLeader in lease client
Unconditionally opens a WithRequireLeader stream in the lease client. Any
keep alive channels opened using WithRequireLeader will be closed when
the leader is lost.

Fixes #7275
2017-03-30 21:39:36 -07:00
Anthony Romano 3c306cdb3e clientv3: do not set next keepalive time <= now+TTL 2017-02-21 13:15:45 -08:00
fanmin shi a5cf7fdc87 Merge pull request #7221 from fanminshi/grpcproxy_support_lease_coalescing
grpcproxy: support lease coalescing
2017-02-16 13:42:49 -08:00
Xiang 4fb8d30f0a clientv3: fix lease keepalive duration 2017-02-16 12:04:07 -08:00
Xiang Li 5d3597a5f2 Merge pull request #7338 from xiang90/fix_l
clientv3: fix lease keepalive duration
2017-02-16 11:58:10 -08:00
fanmin shi 65b59f4423 grpcproxy: incorporate lease proxy into existing proxy framework 2017-02-16 11:50:59 -08:00
Xiang 4274db46f2 clientv3: fix lease keepalive duration 2017-02-16 11:25:26 -08:00
fanmin shi 8cb5e05fc9 clientv3: KeepAliveOnce returns ErrLeaseNotFound if TTL <= 0 2017-02-14 15:19:29 -08:00
Anthony Romano cf5cc18f02 Merge pull request #7286 from heyitsanthony/lease-snip-cancel-stop
clientv3: remove cancelWhenStop from lease implementation
2017-02-07 09:12:34 -08:00
Anthony Romano a213b3abf5 clientv3: remove cancelWhenStop from lease implementation
Only have Close() cancel out outstanding goroutines. Canceling out
single-shot RPCs will mask connection close on client.Close().
2017-02-06 17:21:46 -08:00
Anthony Romano a9f10bdeee clientv3: only start lease stream after first keepalive call
Fixes #7274
2017-02-06 11:52:57 -08:00
fanmin shi 720234d32b clientv3: sends keepalive reqs immediately after lease keep alive stream reset
when lease client reset lease keep alive stream, sendKeepAliveLoop() should send out keep alive reqs immediately instead of waiting for 500ms.
2017-02-03 16:36:24 -08:00
Anthony Romano 5e3b20e70c clientv3: don't reset stream on keepaliveonce or revoke failure
Would cause the keepalive loop to cancel out.

Fixes #7082
2017-01-13 09:05:23 -08:00
Anthony Romano a375e91c66 clientv3: don't reset keepalive stream on grant failure
Was triggering cancelation errors on outstanding KeepAlives if Grant
had to retry.
2016-12-16 10:36:51 -08:00
Denys Smirnov b126e31132 clientv3: better error message for keep alive loop halt 2016-12-15 16:06:27 +02:00
Denys Smirnov e0bcd4d516 clientv3: return error from KeepAlive if corresponding loop exits
after recvKeepAliveLoop exits client might call KeepAlive adding request channel that will not be closed
this fix makes sure that recvKeepAliveLoop is running before adding request to lessor's list and returns error otherwise

Fixes #6922
2016-12-15 03:02:35 +02:00
Xiang Li 9205a242b9 clientv3: do not retry on mutable operations 2016-10-20 10:48:10 -07:00
Iwasaki Yudai 6a33f0ffd5 clientv3: make balancer respect FastFail
The simpleBalancer.Get() blocks grpc.Invoke() even when the Invoke() is called
with the FailFast option. Therefore currently any requests with the
FastFail option actually doesn't fail fast. They get blocked when there is
no endpoints available.
Get() method needs to respect the BlockingWait option when
picks up an endpoint address from the list and fail immediately when the option is
enabled and no endpoint is available.
2016-10-17 14:11:51 -07:00
Gyu-Ho Lee 4c08f6767c clientv3: add lease.TimeToLive + tests 2016-09-09 08:18:45 +09:00
Gyu-Ho Lee 1aec483e42 clientv3: use correct context in toErr (lease) 2016-09-08 10:58:11 +09:00
Anthony Romano 3eadf964f4 clientv3: use failfast and retry wrappers for at-most-once rpcs 2016-08-16 10:49:50 -07:00
Anthony Romano d8f0ef0e80 clientv3: use grpc.FailFast(false) for all calls 2016-07-14 17:58:58 -07:00
davygeek 8c96d2573f *: fixed some warning 2016-06-30 23:13:46 +08:00
James Shubin 6480066054 *: misc typos and go vet fixes 2016-06-22 10:32:13 -07:00