Skip to content

Commit

Permalink
bidirectional streaming for Source Transformer
Browse files Browse the repository at this point in the history
Signed-off-by: Sreekanth <[email protected]>
  • Loading branch information
BulkBeing committed Sep 23, 2024
1 parent 232ccc9 commit 99bdd08
Show file tree
Hide file tree
Showing 6 changed files with 311 additions and 97 deletions.
54 changes: 37 additions & 17 deletions pkg/apis/proto/sourcetransform/v1/transform.pb.go

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

6 changes: 5 additions & 1 deletion pkg/apis/proto/sourcetransform/v1/transform.proto
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ service SourceTransform {
// SourceTransformFn applies a function to each request element.
// In addition to map function, SourceTransformFn also supports assigning a new event time to response.
// SourceTransformFn can be used only at source vertex by source data transformer.
rpc SourceTransformFn(SourceTransformRequest) returns (SourceTransformResponse);
rpc SourceTransformFn(stream SourceTransformRequest) returns (stream SourceTransformResponse);

// IsReady is the heartbeat endpoint for gRPC.
rpc IsReady(google.protobuf.Empty) returns (ReadyResponse);
Expand All @@ -26,6 +26,8 @@ message SourceTransformRequest {
google.protobuf.Timestamp event_time = 3;
google.protobuf.Timestamp watermark = 4;
map<string, string> headers = 5;
// This ID is used uniquely identify a transform request
string id = 6;
}

/**
Expand All @@ -39,6 +41,8 @@ message SourceTransformResponse {
repeated string tags = 4;
}
repeated Result results = 1;
// This ID is used to refer the responses to the request it corresponds to.
string id = 2;
}

/**
Expand Down
87 changes: 60 additions & 27 deletions pkg/apis/proto/sourcetransform/v1/transform_grpc.pb.go

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

12 changes: 6 additions & 6 deletions pkg/apis/proto/sourcetransform/v1/transformmock/transformmock.go

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

Loading

0 comments on commit 99bdd08

Please sign in to comment.