From 9d7bd9ba884cac8ef611c76b8c5b3903c4b0766c Mon Sep 17 00:00:00 2001 From: w-h-a Date: Wed, 3 Jul 2024 13:24:04 -0700 Subject: [PATCH] refactor: consume request with id --- proto/streams/streams.pb.go | 14 ++++++++++++-- proto/streams/streams.proto | 4 +++- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/proto/streams/streams.pb.go b/proto/streams/streams.pb.go index 8120a04..9f631d2 100644 --- a/proto/streams/streams.pb.go +++ b/proto/streams/streams.pb.go @@ -333,6 +333,8 @@ type ConsumeRequest struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } func (x *ConsumeRequest) Reset() { @@ -367,6 +369,13 @@ func (*ConsumeRequest) Descriptor() ([]byte, []int) { return file_proto_streams_streams_proto_rawDescGZIP(), []int{5} } +func (x *ConsumeRequest) GetId() string { + if x != nil { + return x.Id + } + return "" +} + // ack request (no response) type AckRequest struct { state protoimpl.MessageState @@ -577,8 +586,9 @@ var file_proto_streams_streams_proto_rawDesc = []byte{ 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x15, 0x0a, 0x13, 0x55, 0x6e, 0x73, 0x75, 0x62, 0x73, 0x63, 0x72, 0x69, 0x62, 0x65, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x22, 0x10, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 0x22, 0x36, 0x0a, 0x0a, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x65, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x6f, 0x6e, 0x73, 0x75, 0x6d, 0x65, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x22, 0x36, 0x0a, 0x0a, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0xe0, 0x01, 0x0a, diff --git a/proto/streams/streams.proto b/proto/streams/streams.proto index dd2ec9e..14d3f44 100644 --- a/proto/streams/streams.proto +++ b/proto/streams/streams.proto @@ -35,7 +35,9 @@ message UnsubscribeRequest { message UnsubscribeResponse {} // consume request (stream Event response) -message ConsumeRequest {} +message ConsumeRequest { + string id = 1; +} // ack request (no response) message AckRequest {