From f2746d08413518b5f2f3b8490c931e72956d8850 Mon Sep 17 00:00:00 2001 From: Yashash H L Date: Tue, 17 Sep 2024 09:49:39 +0530 Subject: [PATCH] introduce handshake Signed-off-by: Yashash H L --- pkg/apis/proto/source/v1/source.pb.go | 549 ++++++++++++-------- pkg/apis/proto/source/v1/source.proto | 14 +- pkg/sourcer/examples/simple_source/Makefile | 2 +- pkg/sourcer/service.go | 43 +- pkg/sourcer/service_test.go | 31 +- 5 files changed, 378 insertions(+), 261 deletions(-) diff --git a/pkg/apis/proto/source/v1/source.pb.go b/pkg/apis/proto/source/v1/source.pb.go index dba248ac..e17d3b37 100644 --- a/pkg/apis/proto/source/v1/source.pb.go +++ b/pkg/apis/proto/source/v1/source.pb.go @@ -66,7 +66,7 @@ func (x ReadResponse_Status_Code) Number() protoreflect.EnumNumber { // Deprecated: Use ReadResponse_Status_Code.Descriptor instead. func (ReadResponse_Status_Code) EnumDescriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{1, 1, 0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{2, 1, 0} } // Error to indicate the error type. If the code is FAILURE, then the error field will be populated. @@ -113,7 +113,56 @@ func (x ReadResponse_Status_Error) Number() protoreflect.EnumNumber { // Deprecated: Use ReadResponse_Status_Error.Descriptor instead. func (ReadResponse_Status_Error) EnumDescriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{1, 1, 1} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{2, 1, 1} +} + +// Handshake message between client and server to indicate the start of transmission. +type Handshake struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Required field indicating the start of transmission. + Sot bool `protobuf:"varint,1,opt,name=sot,proto3" json:"sot,omitempty"` +} + +func (x *Handshake) Reset() { + *x = Handshake{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[0] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Handshake) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Handshake) ProtoMessage() {} + +func (x *Handshake) ProtoReflect() protoreflect.Message { + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[0] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Handshake.ProtoReflect.Descriptor instead. +func (*Handshake) Descriptor() ([]byte, []int) { + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{0} +} + +func (x *Handshake) GetSot() bool { + if x != nil { + return x.Sot + } + return false } // ReadRequest is the request for reading datum stream from user defined source. @@ -123,13 +172,14 @@ type ReadRequest struct { unknownFields protoimpl.UnknownFields // Required field indicating the request. - Request *ReadRequest_Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + Request *ReadRequest_Request `protobuf:"bytes,1,opt,name=request,proto3" json:"request,omitempty"` + Handshake *Handshake `protobuf:"bytes,2,opt,name=handshake,proto3,oneof" json:"handshake,omitempty"` } func (x *ReadRequest) Reset() { *x = ReadRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[0] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[1] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -142,7 +192,7 @@ func (x *ReadRequest) String() string { func (*ReadRequest) ProtoMessage() {} func (x *ReadRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[0] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[1] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -155,7 +205,7 @@ func (x *ReadRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadRequest.ProtoReflect.Descriptor instead. func (*ReadRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{1} } func (x *ReadRequest) GetRequest() *ReadRequest_Request { @@ -165,6 +215,13 @@ func (x *ReadRequest) GetRequest() *ReadRequest_Request { return nil } +func (x *ReadRequest) GetHandshake() *Handshake { + if x != nil { + return x.Handshake + } + return nil +} + // ReadResponse is the response for reading datum stream from user defined source. type ReadResponse struct { state protoimpl.MessageState @@ -180,7 +237,7 @@ type ReadResponse struct { func (x *ReadResponse) Reset() { *x = ReadResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[1] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[2] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -193,7 +250,7 @@ func (x *ReadResponse) String() string { func (*ReadResponse) ProtoMessage() {} func (x *ReadResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[1] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[2] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -206,7 +263,7 @@ func (x *ReadResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadResponse.ProtoReflect.Descriptor instead. func (*ReadResponse) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{1} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{2} } func (x *ReadResponse) GetResult() *ReadResponse_Result { @@ -237,7 +294,7 @@ type AckRequest struct { func (x *AckRequest) Reset() { *x = AckRequest{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[2] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -250,7 +307,7 @@ func (x *AckRequest) String() string { func (*AckRequest) ProtoMessage() {} func (x *AckRequest) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[2] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -263,7 +320,7 @@ func (x *AckRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AckRequest.ProtoReflect.Descriptor instead. func (*AckRequest) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{2} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{3} } func (x *AckRequest) GetRequest() *AckRequest_Request { @@ -293,7 +350,7 @@ type AckResponse struct { func (x *AckResponse) Reset() { *x = AckResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[3] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -306,7 +363,7 @@ func (x *AckResponse) String() string { func (*AckResponse) ProtoMessage() {} func (x *AckResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[3] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -319,7 +376,7 @@ func (x *AckResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use AckResponse.ProtoReflect.Descriptor instead. func (*AckResponse) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{3} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{4} } func (x *AckResponse) GetResult() *AckResponse_Result { @@ -342,7 +399,7 @@ type ReadyResponse struct { func (x *ReadyResponse) Reset() { *x = ReadyResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[4] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -355,7 +412,7 @@ func (x *ReadyResponse) String() string { func (*ReadyResponse) ProtoMessage() {} func (x *ReadyResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[4] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -368,7 +425,7 @@ func (x *ReadyResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadyResponse.ProtoReflect.Descriptor instead. func (*ReadyResponse) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{4} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{5} } func (x *ReadyResponse) GetReady() bool { @@ -391,7 +448,7 @@ type PendingResponse struct { func (x *PendingResponse) Reset() { *x = PendingResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[5] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -404,7 +461,7 @@ func (x *PendingResponse) String() string { func (*PendingResponse) ProtoMessage() {} func (x *PendingResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[5] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -417,7 +474,7 @@ func (x *PendingResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PendingResponse.ProtoReflect.Descriptor instead. func (*PendingResponse) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{5} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{6} } func (x *PendingResponse) GetResult() *PendingResponse_Result { @@ -440,7 +497,7 @@ type PartitionsResponse struct { func (x *PartitionsResponse) Reset() { *x = PartitionsResponse{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[6] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -453,7 +510,7 @@ func (x *PartitionsResponse) String() string { func (*PartitionsResponse) ProtoMessage() {} func (x *PartitionsResponse) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[6] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -466,7 +523,7 @@ func (x *PartitionsResponse) ProtoReflect() protoreflect.Message { // Deprecated: Use PartitionsResponse.ProtoReflect.Descriptor instead. func (*PartitionsResponse) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{6} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{7} } func (x *PartitionsResponse) GetResult() *PartitionsResponse_Result { @@ -496,7 +553,7 @@ type Offset struct { func (x *Offset) Reset() { *x = Offset{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[7] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -509,7 +566,7 @@ func (x *Offset) String() string { func (*Offset) ProtoMessage() {} func (x *Offset) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[7] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -522,7 +579,7 @@ func (x *Offset) ProtoReflect() protoreflect.Message { // Deprecated: Use Offset.ProtoReflect.Descriptor instead. func (*Offset) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{7} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{8} } func (x *Offset) GetOffset() []byte { @@ -555,7 +612,7 @@ type ReadRequest_Request struct { func (x *ReadRequest_Request) Reset() { *x = ReadRequest_Request{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[8] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -568,7 +625,7 @@ func (x *ReadRequest_Request) String() string { func (*ReadRequest_Request) ProtoMessage() {} func (x *ReadRequest_Request) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[8] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -581,7 +638,7 @@ func (x *ReadRequest_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadRequest_Request.ProtoReflect.Descriptor instead. func (*ReadRequest_Request) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{0, 0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{1, 0} } func (x *ReadRequest_Request) GetNumRecords() uint64 { @@ -623,7 +680,7 @@ type ReadResponse_Result struct { func (x *ReadResponse_Result) Reset() { *x = ReadResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[9] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -636,7 +693,7 @@ func (x *ReadResponse_Result) String() string { func (*ReadResponse_Result) ProtoMessage() {} func (x *ReadResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[9] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -649,7 +706,7 @@ func (x *ReadResponse_Result) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadResponse_Result.ProtoReflect.Descriptor instead. func (*ReadResponse_Result) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{1, 0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{2, 0} } func (x *ReadResponse_Result) GetPayload() []byte { @@ -693,16 +750,17 @@ type ReadResponse_Status struct { unknownFields protoimpl.UnknownFields // End of transmission flag. - Eot bool `protobuf:"varint,1,opt,name=eot,proto3" json:"eot,omitempty"` - Code ReadResponse_Status_Code `protobuf:"varint,2,opt,name=code,proto3,enum=source.v1.ReadResponse_Status_Code" json:"code,omitempty"` - Error ReadResponse_Status_Error `protobuf:"varint,3,opt,name=error,proto3,enum=source.v1.ReadResponse_Status_Error" json:"error,omitempty"` - Msg *string `protobuf:"bytes,4,opt,name=msg,proto3,oneof" json:"msg,omitempty"` + Eot bool `protobuf:"varint,1,opt,name=eot,proto3" json:"eot,omitempty"` + Code ReadResponse_Status_Code `protobuf:"varint,2,opt,name=code,proto3,enum=source.v1.ReadResponse_Status_Code" json:"code,omitempty"` + Error *ReadResponse_Status_Error `protobuf:"varint,3,opt,name=error,proto3,enum=source.v1.ReadResponse_Status_Error,oneof" json:"error,omitempty"` + Msg *string `protobuf:"bytes,4,opt,name=msg,proto3,oneof" json:"msg,omitempty"` + Handshake *Handshake `protobuf:"bytes,5,opt,name=handshake,proto3,oneof" json:"handshake,omitempty"` } func (x *ReadResponse_Status) Reset() { *x = ReadResponse_Status{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[10] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -715,7 +773,7 @@ func (x *ReadResponse_Status) String() string { func (*ReadResponse_Status) ProtoMessage() {} func (x *ReadResponse_Status) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[10] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -728,7 +786,7 @@ func (x *ReadResponse_Status) ProtoReflect() protoreflect.Message { // Deprecated: Use ReadResponse_Status.ProtoReflect.Descriptor instead. func (*ReadResponse_Status) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{1, 1} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{2, 1} } func (x *ReadResponse_Status) GetEot() bool { @@ -746,8 +804,8 @@ func (x *ReadResponse_Status) GetCode() ReadResponse_Status_Code { } func (x *ReadResponse_Status) GetError() ReadResponse_Status_Error { - if x != nil { - return x.Error + if x != nil && x.Error != nil { + return *x.Error } return ReadResponse_Status_UNACKED } @@ -759,6 +817,13 @@ func (x *ReadResponse_Status) GetMsg() string { return "" } +func (x *ReadResponse_Status) GetHandshake() *Handshake { + if x != nil { + return x.Handshake + } + return nil +} + type AckRequest_Request struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -771,7 +836,7 @@ type AckRequest_Request struct { func (x *AckRequest_Request) Reset() { *x = AckRequest_Request{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[12] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -784,7 +849,7 @@ func (x *AckRequest_Request) String() string { func (*AckRequest_Request) ProtoMessage() {} func (x *AckRequest_Request) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[12] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -797,7 +862,7 @@ func (x *AckRequest_Request) ProtoReflect() protoreflect.Message { // Deprecated: Use AckRequest_Request.ProtoReflect.Descriptor instead. func (*AckRequest_Request) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{2, 0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{3, 0} } func (x *AckRequest_Request) GetOffset() *Offset { @@ -819,7 +884,7 @@ type AckResponse_Result struct { func (x *AckResponse_Result) Reset() { *x = AckResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -832,7 +897,7 @@ func (x *AckResponse_Result) String() string { func (*AckResponse_Result) ProtoMessage() {} func (x *AckResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[13] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -845,7 +910,7 @@ func (x *AckResponse_Result) ProtoReflect() protoreflect.Message { // Deprecated: Use AckResponse_Result.ProtoReflect.Descriptor instead. func (*AckResponse_Result) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{3, 0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{4, 0} } func (x *AckResponse_Result) GetSuccess() *emptypb.Empty { @@ -868,7 +933,7 @@ type PendingResponse_Result struct { func (x *PendingResponse_Result) Reset() { *x = PendingResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[14] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -881,7 +946,7 @@ func (x *PendingResponse_Result) String() string { func (*PendingResponse_Result) ProtoMessage() {} func (x *PendingResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[14] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -894,7 +959,7 @@ func (x *PendingResponse_Result) ProtoReflect() protoreflect.Message { // Deprecated: Use PendingResponse_Result.ProtoReflect.Descriptor instead. func (*PendingResponse_Result) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{5, 0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{6, 0} } func (x *PendingResponse_Result) GetCount() int64 { @@ -916,7 +981,7 @@ type PartitionsResponse_Result struct { func (x *PartitionsResponse_Result) Reset() { *x = PartitionsResponse_Result{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[15] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -929,7 +994,7 @@ func (x *PartitionsResponse_Result) String() string { func (*PartitionsResponse_Result) ProtoMessage() {} func (x *PartitionsResponse_Result) ProtoReflect() protoreflect.Message { - mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[15] + mi := &file_pkg_apis_proto_source_v1_source_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -942,7 +1007,7 @@ func (x *PartitionsResponse_Result) ProtoReflect() protoreflect.Message { // Deprecated: Use PartitionsResponse_Result.ProtoReflect.Descriptor instead. func (*PartitionsResponse_Result) Descriptor() ([]byte, []int) { - return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{6, 0} + return file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP(), []int{7, 0} } func (x *PartitionsResponse_Result) GetPartitions() []int32 { @@ -962,120 +1027,132 @@ var file_pkg_apis_proto_source_v1_source_proto_rawDesc = []byte{ 0x62, 0x75, 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1b, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x65, 0x6d, 0x70, 0x74, 0x79, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, - 0x22, 0x97, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, - 0x12, 0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x22, 0x1d, 0x0a, 0x09, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x12, 0x10, 0x0a, + 0x03, 0x73, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x73, 0x6f, 0x74, 0x22, + 0xde, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x38, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, + 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, + 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x09, 0x68, 0x61, 0x6e, + 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, + 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, + 0x6b, 0x65, 0x48, 0x00, 0x52, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x88, + 0x01, 0x01, 0x1a, 0x4e, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, + 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x22, + 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, + 0x4d, 0x73, 0x42, 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, + 0x22, 0xea, 0x05, 0x0a, 0x0c, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, - 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, - 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x4e, 0x0a, 0x07, 0x52, 0x65, - 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x1f, 0x0a, 0x0b, 0x6e, 0x75, 0x6d, 0x5f, 0x72, 0x65, 0x63, - 0x6f, 0x72, 0x64, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0a, 0x6e, 0x75, 0x6d, 0x52, - 0x65, 0x63, 0x6f, 0x72, 0x64, 0x73, 0x12, 0x22, 0x0a, 0x0d, 0x74, 0x69, 0x6d, 0x65, 0x6f, 0x75, - 0x74, 0x5f, 0x69, 0x6e, 0x5f, 0x6d, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0d, 0x52, 0x0b, 0x74, - 0x69, 0x6d, 0x65, 0x6f, 0x75, 0x74, 0x49, 0x6e, 0x4d, 0x73, 0x22, 0x94, 0x05, 0x0a, 0x0c, 0x52, - 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x36, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, - 0x75, 0x6c, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x1a, 0x9f, 0x02, 0x0a, 0x06, - 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, - 0x12, 0x29, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x11, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x66, 0x66, - 0x73, 0x65, 0x74, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, - 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, - 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, - 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, - 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, 0x12, 0x45, 0x0a, 0x07, 0x68, 0x65, - 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, - 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, - 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, - 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, - 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x1a, 0xf1, 0x01, - 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, 0x0a, 0x03, 0x65, 0x6f, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x65, 0x6f, 0x74, 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, - 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, - 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, - 0x6f, 0x64, 0x65, 0x12, 0x3a, 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, - 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x12, - 0x15, 0x0a, 0x03, 0x6d, 0x73, 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x03, - 0x6d, 0x73, 0x67, 0x88, 0x01, 0x01, 0x22, 0x20, 0x0a, 0x04, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x0b, - 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, 0x0b, 0x0a, 0x07, 0x46, - 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x22, 0x1f, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, - 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x41, 0x43, 0x4b, 0x45, 0x44, 0x10, 0x00, 0x12, 0x09, - 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x01, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x73, - 0x67, 0x22, 0x7b, 0x0a, 0x0a, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, - 0x37, 0x0a, 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, - 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, - 0x07, 0x72, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x12, 0x29, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x80, - 0x01, 0x0a, 0x0b, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, - 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, - 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, - 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x3a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, - 0x30, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, - 0x32, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, - 0x73, 0x22, 0x25, 0x0a, 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x08, 0x52, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x22, 0x6c, 0x0a, 0x0f, 0x50, 0x65, 0x6e, 0x64, - 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x72, - 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, - 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x1e, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, - 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, - 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, - 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, - 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, - 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x28, 0x0a, 0x06, 0x52, 0x65, - 0x73, 0x75, 0x6c, 0x74, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x43, 0x0a, 0x06, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, - 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, - 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x5f, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, - 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xc6, 0x02, 0x0a, 0x06, 0x53, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x12, 0x3d, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x46, 0x6e, 0x12, 0x16, + 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x36, 0x0a, 0x06, 0x73, 0x74, 0x61, + 0x74, 0x75, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1e, 0x2e, 0x73, 0x6f, 0x75, 0x72, + 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, + 0x73, 0x1a, 0x9f, 0x02, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, + 0x70, 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x07, 0x70, + 0x61, 0x79, 0x6c, 0x6f, 0x61, 0x64, 0x12, 0x29, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x11, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, + 0x76, 0x31, 0x2e, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, + 0x74, 0x12, 0x39, 0x0a, 0x0a, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, + 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, + 0x70, 0x52, 0x09, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x12, 0x0a, 0x04, + 0x6b, 0x65, 0x79, 0x73, 0x18, 0x04, 0x20, 0x03, 0x28, 0x09, 0x52, 0x04, 0x6b, 0x65, 0x79, 0x73, + 0x12, 0x45, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, + 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, + 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, + 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, + 0x02, 0x38, 0x01, 0x1a, 0xc7, 0x02, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x10, + 0x0a, 0x03, 0x65, 0x6f, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x03, 0x65, 0x6f, 0x74, + 0x12, 0x37, 0x0a, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x23, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, - 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, - 0x01, 0x30, 0x01, 0x12, 0x38, 0x0a, 0x05, 0x41, 0x63, 0x6b, 0x46, 0x6e, 0x12, 0x15, 0x2e, 0x73, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x43, + 0x6f, 0x64, 0x65, 0x52, 0x04, 0x63, 0x6f, 0x64, 0x65, 0x12, 0x3f, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x2e, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x48, 0x00, + 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x88, 0x01, 0x01, 0x12, 0x15, 0x0a, 0x03, 0x6d, 0x73, + 0x67, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x48, 0x01, 0x52, 0x03, 0x6d, 0x73, 0x67, 0x88, 0x01, + 0x01, 0x12, 0x37, 0x0a, 0x09, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x18, 0x05, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x48, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x48, 0x02, 0x52, 0x09, 0x68, 0x61, + 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x88, 0x01, 0x01, 0x22, 0x20, 0x0a, 0x04, 0x43, 0x6f, + 0x64, 0x65, 0x12, 0x0b, 0x0a, 0x07, 0x53, 0x55, 0x43, 0x43, 0x45, 0x53, 0x53, 0x10, 0x00, 0x12, + 0x0b, 0x0a, 0x07, 0x46, 0x41, 0x49, 0x4c, 0x55, 0x52, 0x45, 0x10, 0x01, 0x22, 0x1f, 0x0a, 0x05, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0b, 0x0a, 0x07, 0x55, 0x4e, 0x41, 0x43, 0x4b, 0x45, 0x44, + 0x10, 0x00, 0x12, 0x09, 0x0a, 0x05, 0x4f, 0x54, 0x48, 0x45, 0x52, 0x10, 0x01, 0x42, 0x08, 0x0a, + 0x06, 0x5f, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x42, 0x06, 0x0a, 0x04, 0x5f, 0x6d, 0x73, 0x67, 0x42, + 0x0c, 0x0a, 0x0a, 0x5f, 0x68, 0x61, 0x6e, 0x64, 0x73, 0x68, 0x61, 0x6b, 0x65, 0x22, 0x7b, 0x0a, + 0x0a, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x37, 0x0a, 0x07, 0x72, + 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, - 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, - 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x3f, 0x0a, - 0x09, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, + 0x65, 0x73, 0x74, 0x2e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x52, 0x07, 0x72, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x34, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, + 0x29, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x11, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x4f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x22, 0x80, 0x01, 0x0a, 0x0b, 0x41, + 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x35, 0x0a, 0x06, 0x72, 0x65, + 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x1a, 0x3a, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x30, 0x0a, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x22, 0x25, 0x0a, + 0x0d, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x14, + 0x0a, 0x05, 0x72, 0x65, 0x61, 0x64, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, + 0x65, 0x61, 0x64, 0x79, 0x22, 0x6c, 0x0a, 0x0f, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x39, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x21, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, + 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x1a, 0x1e, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x7c, 0x0a, 0x12, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3c, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, + 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x2e, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x52, 0x06, + 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x1a, 0x28, 0x0a, 0x06, 0x52, 0x65, 0x73, 0x75, 0x6c, 0x74, + 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x05, 0x52, 0x0a, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, + 0x22, 0x43, 0x0a, 0x06, 0x4f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, + 0x66, 0x73, 0x65, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, + 0x65, 0x74, 0x12, 0x21, 0x0a, 0x0c, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x5f, + 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x70, 0x61, 0x72, 0x74, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xc6, 0x02, 0x0a, 0x06, 0x53, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x12, 0x3d, 0x0a, 0x06, 0x52, 0x65, 0x61, 0x64, 0x46, 0x6e, 0x12, 0x16, 0x2e, 0x73, 0x6f, 0x75, + 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, + 0x65, 0x61, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x30, 0x01, 0x12, + 0x38, 0x0a, 0x05, 0x41, 0x63, 0x6b, 0x46, 0x6e, 0x12, 0x15, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, + 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, + 0x16, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x41, 0x63, 0x6b, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x28, 0x01, 0x12, 0x3f, 0x0a, 0x09, 0x50, 0x65, 0x6e, + 0x64, 0x69, 0x6e, 0x67, 0x46, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, + 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1a, + 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, 0x65, 0x6e, 0x64, 0x69, + 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, 0x0a, 0x0c, 0x50, 0x61, + 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6e, 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, - 0x74, 0x79, 0x1a, 0x1a, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, - 0x65, 0x6e, 0x64, 0x69, 0x6e, 0x67, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x45, - 0x0a, 0x0c, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x46, 0x6e, 0x12, 0x16, - 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, - 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, - 0x76, 0x31, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, - 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, - 0x12, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, - 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, - 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, - 0x73, 0x65, 0x42, 0x3a, 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, - 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, - 0x6f, 0x77, 0x2d, 0x67, 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x74, 0x79, 0x1a, 0x1d, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, 0x2e, 0x50, + 0x61, 0x72, 0x74, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, + 0x65, 0x12, 0x3b, 0x0a, 0x07, 0x49, 0x73, 0x52, 0x65, 0x61, 0x64, 0x79, 0x12, 0x16, 0x2e, 0x67, + 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, + 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x18, 0x2e, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x76, 0x31, + 0x2e, 0x52, 0x65, 0x61, 0x64, 0x79, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x3a, + 0x5a, 0x38, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x6e, 0x75, 0x6d, + 0x61, 0x70, 0x72, 0x6f, 0x6a, 0x2f, 0x6e, 0x75, 0x6d, 0x61, 0x66, 0x6c, 0x6f, 0x77, 0x2d, 0x67, + 0x6f, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x61, 0x70, 0x69, 0x73, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x2f, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, + 0x6f, 0x33, } var ( @@ -1091,59 +1168,62 @@ func file_pkg_apis_proto_source_v1_source_proto_rawDescGZIP() []byte { } var file_pkg_apis_proto_source_v1_source_proto_enumTypes = make([]protoimpl.EnumInfo, 2) -var file_pkg_apis_proto_source_v1_source_proto_msgTypes = make([]protoimpl.MessageInfo, 16) +var file_pkg_apis_proto_source_v1_source_proto_msgTypes = make([]protoimpl.MessageInfo, 17) var file_pkg_apis_proto_source_v1_source_proto_goTypes = []any{ (ReadResponse_Status_Code)(0), // 0: source.v1.ReadResponse.Status.Code (ReadResponse_Status_Error)(0), // 1: source.v1.ReadResponse.Status.Error - (*ReadRequest)(nil), // 2: source.v1.ReadRequest - (*ReadResponse)(nil), // 3: source.v1.ReadResponse - (*AckRequest)(nil), // 4: source.v1.AckRequest - (*AckResponse)(nil), // 5: source.v1.AckResponse - (*ReadyResponse)(nil), // 6: source.v1.ReadyResponse - (*PendingResponse)(nil), // 7: source.v1.PendingResponse - (*PartitionsResponse)(nil), // 8: source.v1.PartitionsResponse - (*Offset)(nil), // 9: source.v1.Offset - (*ReadRequest_Request)(nil), // 10: source.v1.ReadRequest.Request - (*ReadResponse_Result)(nil), // 11: source.v1.ReadResponse.Result - (*ReadResponse_Status)(nil), // 12: source.v1.ReadResponse.Status - nil, // 13: source.v1.ReadResponse.Result.HeadersEntry - (*AckRequest_Request)(nil), // 14: source.v1.AckRequest.Request - (*AckResponse_Result)(nil), // 15: source.v1.AckResponse.Result - (*PendingResponse_Result)(nil), // 16: source.v1.PendingResponse.Result - (*PartitionsResponse_Result)(nil), // 17: source.v1.PartitionsResponse.Result - (*timestamppb.Timestamp)(nil), // 18: google.protobuf.Timestamp - (*emptypb.Empty)(nil), // 19: google.protobuf.Empty + (*Handshake)(nil), // 2: source.v1.Handshake + (*ReadRequest)(nil), // 3: source.v1.ReadRequest + (*ReadResponse)(nil), // 4: source.v1.ReadResponse + (*AckRequest)(nil), // 5: source.v1.AckRequest + (*AckResponse)(nil), // 6: source.v1.AckResponse + (*ReadyResponse)(nil), // 7: source.v1.ReadyResponse + (*PendingResponse)(nil), // 8: source.v1.PendingResponse + (*PartitionsResponse)(nil), // 9: source.v1.PartitionsResponse + (*Offset)(nil), // 10: source.v1.Offset + (*ReadRequest_Request)(nil), // 11: source.v1.ReadRequest.Request + (*ReadResponse_Result)(nil), // 12: source.v1.ReadResponse.Result + (*ReadResponse_Status)(nil), // 13: source.v1.ReadResponse.Status + nil, // 14: source.v1.ReadResponse.Result.HeadersEntry + (*AckRequest_Request)(nil), // 15: source.v1.AckRequest.Request + (*AckResponse_Result)(nil), // 16: source.v1.AckResponse.Result + (*PendingResponse_Result)(nil), // 17: source.v1.PendingResponse.Result + (*PartitionsResponse_Result)(nil), // 18: source.v1.PartitionsResponse.Result + (*timestamppb.Timestamp)(nil), // 19: google.protobuf.Timestamp + (*emptypb.Empty)(nil), // 20: google.protobuf.Empty } var file_pkg_apis_proto_source_v1_source_proto_depIdxs = []int32{ - 10, // 0: source.v1.ReadRequest.request:type_name -> source.v1.ReadRequest.Request - 11, // 1: source.v1.ReadResponse.result:type_name -> source.v1.ReadResponse.Result - 12, // 2: source.v1.ReadResponse.status:type_name -> source.v1.ReadResponse.Status - 14, // 3: source.v1.AckRequest.request:type_name -> source.v1.AckRequest.Request - 15, // 4: source.v1.AckResponse.result:type_name -> source.v1.AckResponse.Result - 16, // 5: source.v1.PendingResponse.result:type_name -> source.v1.PendingResponse.Result - 17, // 6: source.v1.PartitionsResponse.result:type_name -> source.v1.PartitionsResponse.Result - 9, // 7: source.v1.ReadResponse.Result.offset:type_name -> source.v1.Offset - 18, // 8: source.v1.ReadResponse.Result.event_time:type_name -> google.protobuf.Timestamp - 13, // 9: source.v1.ReadResponse.Result.headers:type_name -> source.v1.ReadResponse.Result.HeadersEntry - 0, // 10: source.v1.ReadResponse.Status.code:type_name -> source.v1.ReadResponse.Status.Code - 1, // 11: source.v1.ReadResponse.Status.error:type_name -> source.v1.ReadResponse.Status.Error - 9, // 12: source.v1.AckRequest.Request.offset:type_name -> source.v1.Offset - 19, // 13: source.v1.AckResponse.Result.success:type_name -> google.protobuf.Empty - 2, // 14: source.v1.Source.ReadFn:input_type -> source.v1.ReadRequest - 4, // 15: source.v1.Source.AckFn:input_type -> source.v1.AckRequest - 19, // 16: source.v1.Source.PendingFn:input_type -> google.protobuf.Empty - 19, // 17: source.v1.Source.PartitionsFn:input_type -> google.protobuf.Empty - 19, // 18: source.v1.Source.IsReady:input_type -> google.protobuf.Empty - 3, // 19: source.v1.Source.ReadFn:output_type -> source.v1.ReadResponse - 5, // 20: source.v1.Source.AckFn:output_type -> source.v1.AckResponse - 7, // 21: source.v1.Source.PendingFn:output_type -> source.v1.PendingResponse - 8, // 22: source.v1.Source.PartitionsFn:output_type -> source.v1.PartitionsResponse - 6, // 23: source.v1.Source.IsReady:output_type -> source.v1.ReadyResponse - 19, // [19:24] is the sub-list for method output_type - 14, // [14:19] is the sub-list for method input_type - 14, // [14:14] is the sub-list for extension type_name - 14, // [14:14] is the sub-list for extension extendee - 0, // [0:14] is the sub-list for field type_name + 11, // 0: source.v1.ReadRequest.request:type_name -> source.v1.ReadRequest.Request + 2, // 1: source.v1.ReadRequest.handshake:type_name -> source.v1.Handshake + 12, // 2: source.v1.ReadResponse.result:type_name -> source.v1.ReadResponse.Result + 13, // 3: source.v1.ReadResponse.status:type_name -> source.v1.ReadResponse.Status + 15, // 4: source.v1.AckRequest.request:type_name -> source.v1.AckRequest.Request + 16, // 5: source.v1.AckResponse.result:type_name -> source.v1.AckResponse.Result + 17, // 6: source.v1.PendingResponse.result:type_name -> source.v1.PendingResponse.Result + 18, // 7: source.v1.PartitionsResponse.result:type_name -> source.v1.PartitionsResponse.Result + 10, // 8: source.v1.ReadResponse.Result.offset:type_name -> source.v1.Offset + 19, // 9: source.v1.ReadResponse.Result.event_time:type_name -> google.protobuf.Timestamp + 14, // 10: source.v1.ReadResponse.Result.headers:type_name -> source.v1.ReadResponse.Result.HeadersEntry + 0, // 11: source.v1.ReadResponse.Status.code:type_name -> source.v1.ReadResponse.Status.Code + 1, // 12: source.v1.ReadResponse.Status.error:type_name -> source.v1.ReadResponse.Status.Error + 2, // 13: source.v1.ReadResponse.Status.handshake:type_name -> source.v1.Handshake + 10, // 14: source.v1.AckRequest.Request.offset:type_name -> source.v1.Offset + 20, // 15: source.v1.AckResponse.Result.success:type_name -> google.protobuf.Empty + 3, // 16: source.v1.Source.ReadFn:input_type -> source.v1.ReadRequest + 5, // 17: source.v1.Source.AckFn:input_type -> source.v1.AckRequest + 20, // 18: source.v1.Source.PendingFn:input_type -> google.protobuf.Empty + 20, // 19: source.v1.Source.PartitionsFn:input_type -> google.protobuf.Empty + 20, // 20: source.v1.Source.IsReady:input_type -> google.protobuf.Empty + 4, // 21: source.v1.Source.ReadFn:output_type -> source.v1.ReadResponse + 6, // 22: source.v1.Source.AckFn:output_type -> source.v1.AckResponse + 8, // 23: source.v1.Source.PendingFn:output_type -> source.v1.PendingResponse + 9, // 24: source.v1.Source.PartitionsFn:output_type -> source.v1.PartitionsResponse + 7, // 25: source.v1.Source.IsReady:output_type -> source.v1.ReadyResponse + 21, // [21:26] is the sub-list for method output_type + 16, // [16:21] is the sub-list for method input_type + 16, // [16:16] is the sub-list for extension type_name + 16, // [16:16] is the sub-list for extension extendee + 0, // [0:16] is the sub-list for field type_name } func init() { file_pkg_apis_proto_source_v1_source_proto_init() } @@ -1153,7 +1233,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } if !protoimpl.UnsafeEnabled { file_pkg_apis_proto_source_v1_source_proto_msgTypes[0].Exporter = func(v any, i int) any { - switch v := v.(*ReadRequest); i { + switch v := v.(*Handshake); i { case 0: return &v.state case 1: @@ -1165,7 +1245,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[1].Exporter = func(v any, i int) any { - switch v := v.(*ReadResponse); i { + switch v := v.(*ReadRequest); i { case 0: return &v.state case 1: @@ -1177,7 +1257,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[2].Exporter = func(v any, i int) any { - switch v := v.(*AckRequest); i { + switch v := v.(*ReadResponse); i { case 0: return &v.state case 1: @@ -1189,7 +1269,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[3].Exporter = func(v any, i int) any { - switch v := v.(*AckResponse); i { + switch v := v.(*AckRequest); i { case 0: return &v.state case 1: @@ -1201,7 +1281,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[4].Exporter = func(v any, i int) any { - switch v := v.(*ReadyResponse); i { + switch v := v.(*AckResponse); i { case 0: return &v.state case 1: @@ -1213,7 +1293,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[5].Exporter = func(v any, i int) any { - switch v := v.(*PendingResponse); i { + switch v := v.(*ReadyResponse); i { case 0: return &v.state case 1: @@ -1225,7 +1305,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[6].Exporter = func(v any, i int) any { - switch v := v.(*PartitionsResponse); i { + switch v := v.(*PendingResponse); i { case 0: return &v.state case 1: @@ -1237,7 +1317,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[7].Exporter = func(v any, i int) any { - switch v := v.(*Offset); i { + switch v := v.(*PartitionsResponse); i { case 0: return &v.state case 1: @@ -1249,7 +1329,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[8].Exporter = func(v any, i int) any { - switch v := v.(*ReadRequest_Request); i { + switch v := v.(*Offset); i { case 0: return &v.state case 1: @@ -1261,7 +1341,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[9].Exporter = func(v any, i int) any { - switch v := v.(*ReadResponse_Result); i { + switch v := v.(*ReadRequest_Request); i { case 0: return &v.state case 1: @@ -1273,6 +1353,18 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } file_pkg_apis_proto_source_v1_source_proto_msgTypes[10].Exporter = func(v any, i int) any { + switch v := v.(*ReadResponse_Result); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_apis_proto_source_v1_source_proto_msgTypes[11].Exporter = func(v any, i int) any { switch v := v.(*ReadResponse_Status); i { case 0: return &v.state @@ -1284,7 +1376,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[12].Exporter = func(v any, i int) any { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[13].Exporter = func(v any, i int) any { switch v := v.(*AckRequest_Request); i { case 0: return &v.state @@ -1296,7 +1388,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[13].Exporter = func(v any, i int) any { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[14].Exporter = func(v any, i int) any { switch v := v.(*AckResponse_Result); i { case 0: return &v.state @@ -1308,7 +1400,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[14].Exporter = func(v any, i int) any { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[15].Exporter = func(v any, i int) any { switch v := v.(*PendingResponse_Result); i { case 0: return &v.state @@ -1320,7 +1412,7 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { return nil } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[15].Exporter = func(v any, i int) any { + file_pkg_apis_proto_source_v1_source_proto_msgTypes[16].Exporter = func(v any, i int) any { switch v := v.(*PartitionsResponse_Result); i { case 0: return &v.state @@ -1333,14 +1425,15 @@ func file_pkg_apis_proto_source_v1_source_proto_init() { } } } - file_pkg_apis_proto_source_v1_source_proto_msgTypes[10].OneofWrappers = []any{} + file_pkg_apis_proto_source_v1_source_proto_msgTypes[1].OneofWrappers = []any{} + file_pkg_apis_proto_source_v1_source_proto_msgTypes[11].OneofWrappers = []any{} type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_apis_proto_source_v1_source_proto_rawDesc, NumEnums: 2, - NumMessages: 16, + NumMessages: 17, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/apis/proto/source/v1/source.proto b/pkg/apis/proto/source/v1/source.proto index 314f2905..cc49d307 100644 --- a/pkg/apis/proto/source/v1/source.proto +++ b/pkg/apis/proto/source/v1/source.proto @@ -18,7 +18,7 @@ service Source { // When AckFn is called, it implicitly indicates that the datum stream has been processed by the source vertex. // The caller (numa) expects the AckFn to be successful, and it does not expect any errors. // If there are some irrecoverable errors when the callee (UDSource) is processing the AckFn request, - // then it is best to crash because there are no other retry mechanisms possible. + // then it is best to crash because there are no other retry mechanisms possible. rpc AckFn(stream AckRequest) returns (AckResponse); // PendingFn returns the number of pending records at the user defined source. @@ -31,6 +31,14 @@ service Source { rpc IsReady(google.protobuf.Empty) returns (ReadyResponse); } +/* + * Handshake message between client and server to indicate the start of transmission. + */ +message Handshake { + // Required field indicating the start of transmission. + bool sot = 1; +} + /* * ReadRequest is the request for reading datum stream from user defined source. */ @@ -45,6 +53,7 @@ message ReadRequest { } // Required field indicating the request. Request request = 1; + optional Handshake handshake = 2; } /* @@ -84,8 +93,9 @@ message ReadResponse { // End of transmission flag. bool eot = 1; Code code = 2; - Error error = 3; + optional Error error = 3; optional string msg = 4; + optional Handshake handshake = 5; } // Required field holding the result. Result result = 1; diff --git a/pkg/sourcer/examples/simple_source/Makefile b/pkg/sourcer/examples/simple_source/Makefile index 01879bd1..da06d1e1 100644 --- a/pkg/sourcer/examples/simple_source/Makefile +++ b/pkg/sourcer/examples/simple_source/Makefile @@ -1,6 +1,6 @@ TAG ?= stable PUSH ?= false -IMAGE_REGISTRY = quay.io/numaio/numaflow-go/source-simple-source:${TAG} +IMAGE_REGISTRY = quay.io/yhl25/numaflow-go/source-simple-source:${TAG} ARCHITECTURES = amd64 arm64 .PHONY: build diff --git a/pkg/sourcer/service.go b/pkg/sourcer/service.go index 5ffaa7b0..ff8177df 100644 --- a/pkg/sourcer/service.go +++ b/pkg/sourcer/service.go @@ -34,15 +34,7 @@ func (fs *Service) ReadFn(stream sourcepb.Source_ReadFnServer) error { ctx := stream.Context() errCh := make(chan error, 1) - // Send an empty header so that the client can start sending read requests - // (rust client does not send read requests until it receives a header) - err := stream.SendHeader(map[string][]string{}) - if err != nil { - return err - } - var wg sync.WaitGroup - wg.Add(1) go func() { defer wg.Done() @@ -55,6 +47,34 @@ func (fs *Service) ReadFn(stream sourcepb.Source_ReadFnServer) error { } }() + // Do a handshake with the client before starting to read + req, err := stream.Recv() + if err != nil { + log.Printf("error receiving handshake from stream: %v", err) + errCh <- err + return + } + + if req.Handshake == nil || !req.Handshake.Sot { + errCh <- fmt.Errorf("expected handshake message") + return + } + + // Send handshake response + handshakeResponse := &sourcepb.ReadResponse{ + Status: &sourcepb.ReadResponse_Status{ + Eot: false, + Code: sourcepb.ReadResponse_Status_SUCCESS, + Handshake: &sourcepb.Handshake{ + Sot: true, + }, + }, + } + if err := stream.Send(handshakeResponse); err != nil { + errCh <- err + return + } + for { // Receive read requests from the stream req, err := stream.Recv() @@ -140,13 +160,6 @@ func (a *ackRequest) Offset() Offset { func (fs *Service) AckFn(stream sourcepb.Source_AckFnServer) error { ctx := stream.Context() - // Send an empty header so that the client can start sending ack requests - // (rust client does not send ack requests until it receives a header) - err := stream.SendHeader(map[string][]string{}) - if err != nil { - return err - } - // handle panic defer func() { if r := recover(); r != nil { diff --git a/pkg/sourcer/service_test.go b/pkg/sourcer/service_test.go index b16b4792..be88368e 100644 --- a/pkg/sourcer/service_test.go +++ b/pkg/sourcer/service_test.go @@ -11,7 +11,6 @@ import ( "github.com/stretchr/testify/assert" "google.golang.org/grpc" - "google.golang.org/grpc/metadata" "google.golang.org/protobuf/types/known/emptypb" "google.golang.org/protobuf/types/known/timestamppb" @@ -62,10 +61,6 @@ type ReadFnServerTest struct { index int } -func (t *ReadFnServerTest) SendHeader(metadata.MD) error { - return nil -} - func (t *ReadFnServerTest) Recv() (*sourcepb.ReadRequest, error) { if t.index >= len(t.requests) { return nil, io.EOF @@ -101,10 +96,6 @@ type ReadFnServerErrTest struct { grpc.ServerStream } -func (te *ReadFnServerErrTest) SendHeader(metadata.MD) error { - return nil -} - func (te *ReadFnServerErrTest) Recv() (*sourcepb.ReadRequest, error) { return nil, fmt.Errorf("recv error") } @@ -155,10 +146,6 @@ func NewAckFnServerTest( } } -func (a *AckFnServerTest) SendHeader(metadata.MD) error { - return nil -} - func (a *AckFnServerTest) SendAndClose(*sourcepb.AckResponse) error { return nil } @@ -176,6 +163,15 @@ func TestService_ReadFn(t *testing.T) { { name: "read_fn_read_msg", expected: []*sourcepb.ReadResponse{ + { + Status: &sourcepb.ReadResponse_Status{ + Eot: false, + Code: sourcepb.ReadResponse_Status_SUCCESS, + Handshake: &sourcepb.Handshake{ + Sot: true, + }, + }, + }, { Result: &sourcepb.ReadResponse_Result{ Payload: []byte(`test`), @@ -218,13 +214,18 @@ func TestService_ReadFn(t *testing.T) { if tt.expectedErr { readFnStream = NewReadFnServerErrTest(ctx) } else { - requests := &sourcepb.ReadRequest{ + handshakeRequest := &sourcepb.ReadRequest{ + Handshake: &sourcepb.Handshake{ + Sot: true, + }, + } + readRequest := &sourcepb.ReadRequest{ Request: &sourcepb.ReadRequest_Request{ NumRecords: 1, TimeoutInMs: 1000, }, } - readFnStream = NewReadFnServerTest(ctx, outputCh, []*sourcepb.ReadRequest{requests}) + readFnStream = NewReadFnServerTest(ctx, outputCh, []*sourcepb.ReadRequest{handshakeRequest, readRequest}) } var wg sync.WaitGroup