etcdserver/etcdserverpb: add "fragment" field to "WatchRequest/Response"
Signed-off-by: Gyuho Lee <gyuhox@gmail.com>release-3.4
parent
0a8dd44dc8
commit
5be21c74e4
|
@ -661,14 +661,17 @@ message WatchRequest {
|
||||||
message WatchCreateRequest {
|
message WatchCreateRequest {
|
||||||
// key is the key to register for watching.
|
// key is the key to register for watching.
|
||||||
bytes key = 1;
|
bytes key = 1;
|
||||||
|
|
||||||
// range_end is the end of the range [key, range_end) to watch. If range_end is not given,
|
// range_end is the end of the range [key, range_end) to watch. If range_end is not given,
|
||||||
// only the key argument is watched. If range_end is equal to '\0', all keys greater than
|
// only the key argument is watched. If range_end is equal to '\0', all keys greater than
|
||||||
// or equal to the key argument are watched.
|
// or equal to the key argument are watched.
|
||||||
// If the range_end is one bit larger than the given key,
|
// If the range_end is one bit larger than the given key,
|
||||||
// then all keys with the prefix (the given key) will be watched.
|
// then all keys with the prefix (the given key) will be watched.
|
||||||
bytes range_end = 2;
|
bytes range_end = 2;
|
||||||
|
|
||||||
// start_revision is an optional revision to watch from (inclusive). No start_revision is "now".
|
// start_revision is an optional revision to watch from (inclusive). No start_revision is "now".
|
||||||
int64 start_revision = 3;
|
int64 start_revision = 3;
|
||||||
|
|
||||||
// progress_notify is set so that the etcd server will periodically send a WatchResponse with
|
// progress_notify is set so that the etcd server will periodically send a WatchResponse with
|
||||||
// no events to the new watcher if there are no recent events. It is useful when clients
|
// no events to the new watcher if there are no recent events. It is useful when clients
|
||||||
// wish to recover a disconnected watcher starting from a recent known revision.
|
// wish to recover a disconnected watcher starting from a recent known revision.
|
||||||
|
@ -676,11 +679,12 @@ message WatchCreateRequest {
|
||||||
bool progress_notify = 4;
|
bool progress_notify = 4;
|
||||||
|
|
||||||
enum FilterType {
|
enum FilterType {
|
||||||
// filter out put event.
|
// filter out put event.
|
||||||
NOPUT = 0;
|
NOPUT = 0;
|
||||||
// filter out delete event.
|
// filter out delete event.
|
||||||
NODELETE = 1;
|
NODELETE = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
// filters filter the events at server side before it sends back to the watcher.
|
// filters filter the events at server side before it sends back to the watcher.
|
||||||
repeated FilterType filters = 5;
|
repeated FilterType filters = 5;
|
||||||
|
|
||||||
|
@ -694,6 +698,9 @@ message WatchCreateRequest {
|
||||||
// watchers on the same stream. Creating a watcher with an ID already in
|
// watchers on the same stream. Creating a watcher with an ID already in
|
||||||
// use on the stream will cause an error to be returned.
|
// use on the stream will cause an error to be returned.
|
||||||
int64 watch_id = 7;
|
int64 watch_id = 7;
|
||||||
|
|
||||||
|
// fragment enables splitting large revisions into multiple watch responses.
|
||||||
|
bool fragment = 8;
|
||||||
}
|
}
|
||||||
|
|
||||||
message WatchCancelRequest {
|
message WatchCancelRequest {
|
||||||
|
@ -705,14 +712,17 @@ 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.
|
||||||
int64 watch_id = 2;
|
int64 watch_id = 2;
|
||||||
|
|
||||||
// created is set to true if the response is for a create watch request.
|
// created is set to true if the response is for a create watch request.
|
||||||
// The client should record the watch_id and expect to receive events for
|
// The client should record the watch_id and expect to receive events for
|
||||||
// the created watcher from the same stream.
|
// the created watcher from the same stream.
|
||||||
// All events sent to the created watcher will attach with the same watch_id.
|
// All events sent to the created watcher will attach with the same watch_id.
|
||||||
bool created = 3;
|
bool created = 3;
|
||||||
|
|
||||||
// canceled is set to true if the response is for a cancel watch request.
|
// canceled is set to true if the response is for a cancel watch request.
|
||||||
// No further events will be sent to the canceled watcher.
|
// No further events will be sent to the canceled watcher.
|
||||||
bool canceled = 4;
|
bool canceled = 4;
|
||||||
|
|
||||||
// compact_revision is set to the minimum index if a watcher tries to watch
|
// compact_revision is set to the minimum index if a watcher tries to watch
|
||||||
// at a compacted index.
|
// at a compacted index.
|
||||||
//
|
//
|
||||||
|
@ -726,6 +736,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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue