|
@@ -351,6 +351,9 @@ message ResponseHeader {
|
|
|
// member_id is the ID of the member which sent the response.
|
|
// member_id is the ID of the member which sent the response.
|
|
|
uint64 member_id = 2;
|
|
uint64 member_id = 2;
|
|
|
// revision is the key-value store revision when the request was applied.
|
|
// revision is the key-value store revision when the request was applied.
|
|
|
|
|
+ // For watch progress responses, the header.revision indicates progress. All future events
|
|
|
|
|
+ // recieved in this stream are guaranteed to have a higher revision number than the
|
|
|
|
|
+ // header.revision number.
|
|
|
int64 revision = 3;
|
|
int64 revision = 3;
|
|
|
// raft_term is the raft term when the request was applied.
|
|
// raft_term is the raft term when the request was applied.
|
|
|
uint64 raft_term = 4;
|
|
uint64 raft_term = 4;
|
|
@@ -639,6 +642,7 @@ message WatchRequest {
|
|
|
oneof request_union {
|
|
oneof request_union {
|
|
|
WatchCreateRequest create_request = 1;
|
|
WatchCreateRequest create_request = 1;
|
|
|
WatchCancelRequest cancel_request = 2;
|
|
WatchCancelRequest cancel_request = 2;
|
|
|
|
|
+ WatchProgressRequest progress_request = 3;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -671,6 +675,16 @@ message WatchCreateRequest {
|
|
|
// If prev_kv is set, created watcher gets the previous KV before the event happens.
|
|
// If prev_kv is set, created watcher gets the previous KV before the event happens.
|
|
|
// If the previous KV is already compacted, nothing will be returned.
|
|
// If the previous KV is already compacted, nothing will be returned.
|
|
|
bool prev_kv = 6;
|
|
bool prev_kv = 6;
|
|
|
|
|
+
|
|
|
|
|
+ // If watch_id is provided and non-zero, it will be assigned to this watcher.
|
|
|
|
|
+ // Since creating a watcher in etcd is not a synchronous operation,
|
|
|
|
|
+ // this can be used ensure that ordering is correct when creating multiple
|
|
|
|
|
+ // watchers on the same stream. Creating a watcher with an ID already in
|
|
|
|
|
+ // use on the stream will cause an error to be returned.
|
|
|
|
|
+ int64 watch_id = 7;
|
|
|
|
|
+
|
|
|
|
|
+ // fragment enables splitting large revisions into multiple watch responses.
|
|
|
|
|
+ bool fragment = 8;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
message WatchCancelRequest {
|
|
message WatchCancelRequest {
|
|
@@ -678,6 +692,11 @@ message WatchCancelRequest {
|
|
|
int64 watch_id = 1;
|
|
int64 watch_id = 1;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+// Requests the a watch stream progress status be sent in the watch response stream as soon as
|
|
|
|
|
+// possible.
|
|
|
|
|
+message WatchProgressRequest {
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
message WatchResponse {
|
|
message WatchResponse {
|
|
|
ResponseHeader header = 1;
|
|
ResponseHeader header = 1;
|
|
|
// watch_id is the ID of the watcher that corresponds to the response.
|
|
// watch_id is the ID of the watcher that corresponds to the response.
|
|
@@ -703,6 +722,9 @@ message WatchResponse {
|
|
|
// cancel_reason indicates the reason for canceling the watcher.
|
|
// cancel_reason indicates the reason for canceling the watcher.
|
|
|
string cancel_reason = 6;
|
|
string cancel_reason = 6;
|
|
|
|
|
|
|
|
|
|
+ // framgment is true if large watch response was split over multiple responses.
|
|
|
|
|
+ bool fragment = 7;
|
|
|
|
|
+
|
|
|
repeated mvccpb.Event events = 11;
|
|
repeated mvccpb.Event events = 11;
|
|
|
}
|
|
}
|
|
|
|
|
|