*: update watch related proto
1. Add watch/cancel request 2. Add necessary fields in response to return watch error 3. Add watch_id into watch response
This commit is contained in:
@ -74,9 +74,9 @@ func watchCommandFunc(cmd *cobra.Command, args []string) {
|
||||
var r *pb.WatchRequest
|
||||
switch segs[0] {
|
||||
case "watch":
|
||||
r = &pb.WatchRequest{Key: []byte(segs[1])}
|
||||
r = &pb.WatchRequest{CreateRequest: &pb.WatchCreateRequest{Key: []byte(segs[1])}}
|
||||
case "watchprefix":
|
||||
r = &pb.WatchRequest{Prefix: []byte(segs[1])}
|
||||
r = &pb.WatchRequest{CreateRequest: &pb.WatchCreateRequest{Prefix: []byte(segs[1])}}
|
||||
default:
|
||||
fmt.Fprintf(os.Stderr, "Invalid watch request format: use watch key or watchprefix prefix\n")
|
||||
continue
|
||||
|
Reference in New Issue
Block a user