Merge pull request #9024 from gyuho/snapshot-doc

clientv3: document context to "Snapshot" API
This commit is contained in:
Gyuho Lee 2017-12-21 12:44:40 -08:00 committed by GitHub
commit 096c947159
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

2
.words
View File

@ -34,7 +34,9 @@ prefetching
protobuf
prometheus
repin
rpc
serializable
statusError
teardown
too_many_pings
uncontended

View File

@ -57,6 +57,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.