docs: fix description of WatchResponse.canceled

Signed-off-by: Myrat92 <zjsegzhf@gmail.com>
This commit is contained in:
zhanghangfeng 2024-09-12 17:02:48 +08:00 committed by Myrat92
parent 981061a495
commit 4155d8bb5b
3 changed files with 5 additions and 3 deletions

View File

@ -2982,7 +2982,7 @@
},
"canceled": {
"type": "boolean",
"description": "canceled is set to true if the response is for a cancel watch request.\nNo further events will be sent to the canceled watcher."
"description": "canceled is set to true if the response is for a cancel watch request\nor if the start_revision has already been compacted.\nNo further events will be sent to the canceled watcher."
},
"compact_revision": {
"type": "string",

View File

@ -2199,7 +2199,8 @@ type WatchResponse struct {
// the created watcher from the same stream.
// All events sent to the created watcher will attach with the same watch_id.
Created bool `protobuf:"varint,3,opt,name=created,proto3" json:"created,omitempty"`
// 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
// or if the start_revision has already been compacted.
// No further events will be sent to the canceled watcher.
Canceled bool `protobuf:"varint,4,opt,name=canceled,proto3" json:"canceled,omitempty"`
// compact_revision is set to the minimum index if a watcher tries to watch

View File

@ -836,7 +836,8 @@ message WatchResponse {
// All events sent to the created watcher will attach with the same watch_id.
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
// or if the start_revision has already been compacted.
// No further events will be sent to the canceled watcher.
bool canceled = 4;