From b456452240b27b80d0ab5a6d6ad74055f6edb451 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Thu, 14 Dec 2017 16:35:37 -0800 Subject: [PATCH 1/2] words: whitelist "statusError" Signed-off-by: Gyuho Lee --- .words | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.words b/.words index 561453ce9..deb49c46c 100644 --- a/.words +++ b/.words @@ -29,7 +29,9 @@ prefetching protobuf prometheus repin +rpc serializable +statusError teardown too_many_pings uncontended From e833b7c2d888f0b7cf60f349f5eac845bed1fc23 Mon Sep 17 00:00:00 2001 From: Gyuho Lee Date: Fri, 15 Dec 2017 13:58:43 -0800 Subject: [PATCH 2/2] clientv3: document context to "Snapshot" API Signed-off-by: Gyuho Lee --- clientv3/maintenance.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clientv3/maintenance.go b/clientv3/maintenance.go index 25abc9c91..df467c6ea 100644 --- a/clientv3/maintenance.go +++ b/clientv3/maintenance.go @@ -55,6 +55,8 @@ type Maintenance interface { HashKV(ctx context.Context, endpoint string, rev int64) (*HashKVResponse, error) // Snapshot provides a reader for a point-in-time snapshot of etcd. + // If the context "ctx" is canceled or timed out, reading from returned + // "io.ReadCloser" would error out (e.g. context.Canceled, context.DeadlineExceeded). Snapshot(ctx context.Context) (io.ReadCloser, error) // MoveLeader requests current leader to transfer its leadership to the transferee.