Skip to content

Commit

Permalink
pass eot request
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 26, 2024
1 parent a799310 commit 516ac07
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pkg/sdkclient/sinker/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,17 @@ func (c *client) SinkFn(ctx context.Context, requests []*sinkpb.SinkRequest) ([]
}
}

// send eot request
eotRequest := &sinkpb.SinkRequest{
Status: &sinkpb.SinkRequest_Status{
Eot: true,
},
}

if err := c.sinkStream.Send(eotRequest); err != nil {
return nil, fmt.Errorf("failed to send eot request: %v", err)
}

// Wait for the corresponding responses
var responses []*sinkpb.SinkResponse
for i := 0; i < len(requests); i++ {
Expand Down

0 comments on commit 516ac07

Please sign in to comment.