Skip to content

Commit

Permalink
add handshake at top level
Browse files Browse the repository at this point in the history
Signed-off-by: Yashash H L <[email protected]>
  • Loading branch information
yhl25 committed Sep 17, 2024
1 parent f2746d0 commit ee2f308
Show file tree
Hide file tree
Showing 4 changed files with 63 additions and 62 deletions.
111 changes: 56 additions & 55 deletions pkg/apis/proto/source/v1/source.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/apis/proto/source/v1/source.proto
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,13 @@ message ReadResponse {
Code code = 2;
optional Error error = 3;
optional string msg = 4;
optional Handshake handshake = 5;
}
// Required field holding the result.
Result result = 1;
// Status of the response. Holds the end of transmission flag and the status code.
//
Status status = 2;
optional Handshake handshake = 3;
}

/*
Expand Down
6 changes: 3 additions & 3 deletions pkg/sourcer/service.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ func (fs *Service) ReadFn(stream sourcepb.Source_ReadFnServer) error {
Status: &sourcepb.ReadResponse_Status{
Eot: false,
Code: sourcepb.ReadResponse_Status_SUCCESS,
Handshake: &sourcepb.Handshake{
Sot: true,
},
},
Handshake: &sourcepb.Handshake{
Sot: true,
},
}
if err := stream.Send(handshakeResponse); err != nil {
Expand Down
6 changes: 3 additions & 3 deletions pkg/sourcer/service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,9 +167,9 @@ func TestService_ReadFn(t *testing.T) {
Status: &sourcepb.ReadResponse_Status{
Eot: false,
Code: sourcepb.ReadResponse_Status_SUCCESS,
Handshake: &sourcepb.Handshake{
Sot: true,
},
},
Handshake: &sourcepb.Handshake{
Sot: true,
},
},
{
Expand Down

0 comments on commit ee2f308

Please sign in to comment.