diff --git a/pkg/apis/proto/source/v1/source.pb.go b/pkg/apis/proto/source/v1/source.pb.go index 1c59e6fe..67a0c4d9 100644 --- a/pkg/apis/proto/source/v1/source.pb.go +++ b/pkg/apis/proto/source/v1/source.pb.go @@ -231,8 +231,9 @@ type ReadResponse struct { // Required field holding the result. Result *ReadResponse_Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` // Status of the response. Holds the end of transmission flag and the status code. - Status *ReadResponse_Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` - Handshake *Handshake `protobuf:"bytes,3,opt,name=handshake,proto3,oneof" json:"handshake,omitempty"` + Status *ReadResponse_Status `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` + // Handshake message between client and server to indicate the start of transmission. + Handshake *Handshake `protobuf:"bytes,3,opt,name=handshake,proto3,oneof" json:"handshake,omitempty"` } func (x *ReadResponse) Reset() { @@ -360,8 +361,9 @@ type AckResponse struct { unknownFields protoimpl.UnknownFields // Required field holding the result. - Result *AckResponse_Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` - Handshake *Handshake `protobuf:"bytes,2,opt,name=handshake,proto3,oneof" json:"handshake,omitempty"` + Result *AckResponse_Result `protobuf:"bytes,1,opt,name=result,proto3" json:"result,omitempty"` + // Handshake message between client and server to indicate the start of transmission. + Handshake *Handshake `protobuf:"bytes,2,opt,name=handshake,proto3,oneof" json:"handshake,omitempty"` } func (x *AckResponse) Reset() { diff --git a/pkg/apis/proto/source/v1/source_grpc.pb.go b/pkg/apis/proto/source/v1/source_grpc.pb.go index 6348fe00..69818db4 100644 --- a/pkg/apis/proto/source/v1/source_grpc.pb.go +++ b/pkg/apis/proto/source/v1/source_grpc.pb.go @@ -32,15 +32,17 @@ const ( // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. type SourceClient interface { // Read returns a stream of datum responses. - // The size of the returned ReadResponse is less than or equal to the num_records specified in each ReadRequest. - // If the request timeout is reached on the server side, the returned ReadResponse will contain all the datum that have been read (which could be an empty list). + // The size of the returned responses is less than or equal to the num_records specified in each ReadRequest. + // If the request timeout is reached on the server side, the returned responses will contain all the datum that have been read (which could be an empty list). // The server will continue to read and respond to subsequent ReadRequests until the client closes the stream. + // Once it has sent all the datum, the server will send a ReadResponse with the end of transmission flag set to true. ReadFn(ctx context.Context, opts ...grpc.CallOption) (Source_ReadFnClient, error) // AckFn acknowledges a stream of datum offsets. // 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. + // Clients sends n requests and expects n responses. AckFn(ctx context.Context, opts ...grpc.CallOption) (Source_AckFnClient, error) // PendingFn returns the number of pending records at the user defined source. PendingFn(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*PendingResponse, error) @@ -157,15 +159,17 @@ func (c *sourceClient) IsReady(ctx context.Context, in *emptypb.Empty, opts ...g // for forward compatibility type SourceServer interface { // Read returns a stream of datum responses. - // The size of the returned ReadResponse is less than or equal to the num_records specified in each ReadRequest. - // If the request timeout is reached on the server side, the returned ReadResponse will contain all the datum that have been read (which could be an empty list). + // The size of the returned responses is less than or equal to the num_records specified in each ReadRequest. + // If the request timeout is reached on the server side, the returned responses will contain all the datum that have been read (which could be an empty list). // The server will continue to read and respond to subsequent ReadRequests until the client closes the stream. + // Once it has sent all the datum, the server will send a ReadResponse with the end of transmission flag set to true. ReadFn(Source_ReadFnServer) error // AckFn acknowledges a stream of datum offsets. // 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. + // Clients sends n requests and expects n responses. AckFn(Source_AckFnServer) error // PendingFn returns the number of pending records at the user defined source. PendingFn(context.Context, *emptypb.Empty) (*PendingResponse, error)