Anthony Romano
62d7bae496
clientv3: respect dial timeout when authenticating
...
Fixes #7627
2017-03-31 15:14:46 -07:00
Anthony Romano
a2cdd908dc
clientv3: permit creating client without grpc connection
...
For creating client from etcdserver.
2017-03-13 15:23:26 -07:00
Anthony Romano
270dc9427b
clientv3: pass back dial error on dial timeout
...
Fixes #7419
2017-03-06 09:33:10 -08:00
Anthony Romano
4d2aa80ecf
clientv3: add cluster version checking
2017-02-16 18:14:14 -08:00
Anthony Romano
c9452c6ad4
clientv3: let user provide a client context through Config
2017-02-16 18:14:14 -08:00
Anthony Romano
8c43bd06a0
clientv3: add DialOptions to config
...
Removes strict prometheus dependency.
Fixes #7058
2017-02-03 12:00:20 -08:00
Anthony Romano
b465b48476
clientv3: remove strict yaml dependency
...
Moved to clientv3/yaml
2017-02-01 21:02:45 -08:00
Anthony Romano
56286ccd29
clientv3: use DialContext
...
Fixes #7216
2017-01-25 09:49:41 -08:00
Hitoshi Mitake
d431b64d97
etcdserver, clientv3: handle a case of expired auth token
...
This commit adds a mechanism of handling a case of expired auth token
to clientv3. If a server returns an error code
grpc.codes.Unauthenticated, newRetryWrapper() tries to get a new token
and use it as an option of PerRPCCredential.
Fixes https://github.com/coreos/etcd/issues/7012
2017-01-12 11:49:02 +09:00
Anthony Romano
246fb29d8a
clientv3: close Lease on client Close
...
Fixes #6987
2016-12-14 12:11:17 -08:00
Gyu-Ho Lee
a08103c088
clientv3: return copy of endpoints, not pointer
...
Fix https://github.com/coreos/etcd/issues/6892 .
2016-11-23 11:33:54 -08:00
sharat
8fd1dd7862
clientv3: added client side metrics support
2016-10-27 22:47:45 +05:30
Anthony Romano
c100e40715
clientv3: only receive from closing streams in Watcher close
...
Was overcounting the number of expected closing messages; the resuming
list may have nil entries. Also the full client wasn't closing the watcher
client, only canceling its context, so client closes weren't joining with
the watcher shutdown.
Fixes #6605
2016-10-20 15:33:11 -07:00
Gyu-Ho Lee
084c407a8d
clientv3: drop Config.Logger field
...
Fix https://github.com/coreos/etcd/issues/6603 .
Instead adds 'SetLogger' to set global logger interface
to avoid unnecessary logger updates.
2016-10-11 16:38:32 -07:00
Gyu-Ho Lee
f45542394b
clientv3: handle 'https' scheme in endpoint
2016-10-03 01:03:28 -07:00
Gyu-Ho Lee
cdb1e34799
clientv3: add 'Sync' method
2016-09-21 09:10:25 -07:00
Gyu-Ho Lee
b9d18d4ac9
clientv3: add 'SetEndpoints' method
2016-09-20 04:36:01 +09:00
Anthony Romano
5e963608b7
clientv3: do not treat Internal codes as halting
...
Fixes #6277
2016-08-28 20:20:22 -07:00
Anthony Romano
267063efd0
clientv3: use grpc codes to translate raw grpc errors
2016-08-26 09:22:09 -07: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
46765ad79c
clientv3: respect up/down notifications from grpc
...
Fixes #5842
2016-08-16 09:49:36 -07:00
Anthony Romano
429d5ab20b
clientv3: only block on New() when DialTimeout > 0
...
Fixes #6162
2016-08-12 10:33:11 -07:00
Anthony Romano
8abae076d1
rpctypes, clientv3: retry RPC on EtcdStopped
...
Fixes #5983
2016-07-19 18:29:12 -07:00
Gyu-Ho Lee
5225a4e4bc
clientv3: fix client for grpc change
...
Fix https://github.com/coreos/etcd/issues/5638 .
2016-06-10 20:40:46 -07:00
Anthony Romano
349eaf117a
clientv3: use separate dialopts for auth dial
...
Needs to use a different balancer from the main client connection
because of the way grpc uses the Notify channel.
2016-06-09 10:38:57 -07:00
Anthony Romano
4a13c9f9b3
clientv3: use grpc balancer
2016-06-08 09:24:13 -07:00
Anthony Romano
62f8ec25c0
clientv3: use grpc reconnection logic
2016-06-08 01:04:59 -07:00
Anthony Romano
7dfe7db243
clientv3: panic if ActiveConnection tries to return non-nil connection
2016-06-03 10:25:20 -07:00
Anthony Romano
5f5a203e27
clientv3: don't hold client lock while dialing
...
Causes async reconnect to block while the client is dialing.
This was also causing problems with the Close error message, so
now Close() will return the last dial error (if any) instead of
clearing it out with a cancel().
Fixes #5416
2016-06-03 10:25:20 -07:00
Anthony Romano
22744566f4
clientv3: hide retry dial api
2016-06-01 11:36:16 -07:00
Gyu-Ho Lee
7b5657cf1a
clientv3: check if KV.Client is closed
...
For https://github.com/coreos/etcd/issues/5495 .
2016-05-31 12:00:19 -07:00
Anthony Romano
9dc0782f45
clientv3: handle URL scheme when given in endpoint
...
Fixes #5427
2016-05-25 18:01:36 -06:00
James Shubin
edca3cbe44
clientv3: Fix typos
...
Found randomly when going through docs. HTH
2016-05-20 14:06:29 -04:00
Anthony Romano
782a8802c0
clientv3: avoid reusing closed connection in KV
2016-05-18 14:46:17 -07:00
Hitoshi Mitake
6259318521
*: attach auth token as a gRPC credential
...
This commit adds a functionality of attaching an auth token to gRPC
connection as a per RPC credential.
For doing this, this commit lets clientv3.Client.Dial() create a
dedicated gRPC connection for doing authentication. With the dedicated
connection, the client calls Authenticate() RPC and obtain its
token. The token is attached to the main gRPC connection with
grpc.WithPerRPCCredentials().
This commit also adds a new option --username to etcdctl (v3). With
this option, etcdctl attaches its auth token to the main gRPC
connection (currently it is not used at all).
2016-05-17 13:26:12 +09:00
Anthony Romano
e8101ddf09
clientv3: throttle reconnection rate
...
Client was reconnecting after establishing connections because the lease
and watch APIs were thrashing. Instead, wait a little before accepting
new reconnect requests.
2016-05-16 11:14:45 -07:00
Gyu-Ho Lee
fd9e07a529
clientv3: update LICENSE header
2016-05-12 20:50:58 -07:00
Gyu-Ho Lee
68eaf4083a
clientv3: WithRequireLeader
2016-05-12 19:25:42 -07:00
Anthony Romano
527aa1a499
clientv3: fix Close after failed Put
...
Was crashing on a nil connection. Reworked the shutdown path a little so
there's only one connection close site.
2016-05-12 16:16:27 -07:00
Anthony Romano
cdc8f99658
clientv3: rework reconnection logic
...
Avoids go routine flood for tight loops with a dead connection.
Now uses request ctx when reconnecting for immediate retry.
2016-05-05 19:30:11 -07:00
Gyu-Ho Lee
2e3d79a7bf
clientv3: convert errors to rpctypes on returning
...
For https://github.com/coreos/etcd/issues/5211 .
2016-04-28 15:39:37 -07:00
Xiang Li
802de5f9f8
clientv3: support read conf from file
2016-04-01 09:36:11 -07:00
Anthony Romano
c91b2d098d
clientv3: AlarmList and AlarmDisarm
2016-03-30 13:33:52 -07:00
Anthony Romano
161bc5e19c
clientv3: fix race when setting grpc Logger
...
grpc only permits SetLogger on init()
2016-03-28 23:30:03 -07:00
Gyu-Ho Lee
29fccb3221
clientv3: configurable grpc logger
2016-03-26 22:38:53 -07:00
Anthony Romano
bd832e5b0a
*: migrate Godeps to vendor/
2016-03-22 17:10:28 -07:00
Xiang Li
7c377fa703
*: add client.defrag and defrag cmd for etcdctl
2016-03-10 09:30:41 -08:00
Anthony Romano
78132c9b5b
clientv3: use tls.Config in clientv3.Config
...
Fixes #4648
2016-03-07 16:08:40 -08:00
Anthony Romano
d21d2e6624
clientv3: don't deadlock on Close with broken connection
...
Fixes #4679
2016-03-07 13:46:54 -08:00
Anthony Romano
360aafec76
clientv3: include a context in Client
...
Useful for clean up tasks
2016-03-04 09:20:44 -08:00