Skip to content

Commit

Permalink
clientv3: document context to Snapshot streaming API
Browse files Browse the repository at this point in the history
Signed-off-by: Gyuho Lee <[email protected]>
  • Loading branch information
gyuho committed Dec 15, 2017
1 parent ff4d9d5 commit ac05c67
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions clientv3/maintenance.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ 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, and its error type is "grpc/*status.statusError".
// The error message would be either:
// 1. "rpc error: code = Canceled desc = context canceled"
// 2. "rpc error: code = DeadlineExceeded desc = context deadline exceeded"
Snapshot(ctx context.Context) (io.ReadCloser, error)

// MoveLeader requests current leader to transfer its leadership to the transferee.
Expand Down

0 comments on commit ac05c67

Please sign in to comment.