From e3c617c0dc1277b0854efab8edf862c3003fcfbf Mon Sep 17 00:00:00 2001 From: Vigith Maurice Date: Sun, 11 Aug 2024 20:21:51 -0700 Subject: [PATCH 1/2] chore: fix transform Signed-off-by: Vigith Maurice --- .../sourcetransform/v1/sourcetransform.proto | 66 +++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 pkg/apis/proto/sourcetransform/v1/sourcetransform.proto diff --git a/pkg/apis/proto/sourcetransform/v1/sourcetransform.proto b/pkg/apis/proto/sourcetransform/v1/sourcetransform.proto new file mode 100644 index 0000000000..b93d82b9a8 --- /dev/null +++ b/pkg/apis/proto/sourcetransform/v1/sourcetransform.proto @@ -0,0 +1,66 @@ +/* +Copyright 2022 The Numaproj Authors. + +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. +*/ + +syntax = "proto3"; + +option go_package = "github.com/numaproj/numaflow-go/pkg/apis/proto/sourcetransform/v1"; +option java_package = "io.numaproj.numaflow.sourcetransformer.v1"; + +import "google/protobuf/timestamp.proto"; +import "google/protobuf/empty.proto"; + +package sourcetransformer.v1; + +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); + + // IsReady is the heartbeat endpoint for gRPC. + rpc IsReady(google.protobuf.Empty) returns (ReadyResponse); +} + +/** + * SourceTransformerRequest represents a request element. + */ +message SourceTransformRequest { + repeated string keys = 1; + bytes value = 2; + google.protobuf.Timestamp event_time = 3; + google.protobuf.Timestamp watermark = 4; + map headers = 5; +} + +/** + * SourceTransformerResponse represents a response element. + */ +message SourceTransformResponse { + message Result { + repeated string keys = 1; + bytes value = 2; + google.protobuf.Timestamp event_time = 3; + repeated string tags = 4; + } + repeated Result results = 1; +} + +/** + * ReadyResponse is the health check result. + */ +message ReadyResponse { + bool ready = 1; +} From 02c1fe319d7d9db2cb3fa0830b1c6a17a8299369 Mon Sep 17 00:00:00 2001 From: Vigith Maurice Date: Sun, 11 Aug 2024 20:22:25 -0700 Subject: [PATCH 2/2] chore: delete old one Signed-off-by: Vigith Maurice --- .../proto/sourcetransform/v1/transform.proto | 65 ------------------- 1 file changed, 65 deletions(-) delete mode 100644 pkg/apis/proto/sourcetransform/v1/transform.proto diff --git a/pkg/apis/proto/sourcetransform/v1/transform.proto b/pkg/apis/proto/sourcetransform/v1/transform.proto deleted file mode 100644 index c2d0a7182e..0000000000 --- a/pkg/apis/proto/sourcetransform/v1/transform.proto +++ /dev/null @@ -1,65 +0,0 @@ -/* -Copyright 2022 The Numaproj Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -syntax = "proto3"; - -option go_package = "github.com/numaproj/numaflow-go/pkg/apis/proto/sourcetransform/v1"; -option java_package = "io.numaproj.numaflow.sourcetransformer.v1"; - -import "google/protobuf/timestamp.proto"; -import "google/protobuf/empty.proto"; - -package sourcetransformer.v1; - -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); - - // IsReady is the heartbeat endpoint for gRPC. - rpc IsReady(google.protobuf.Empty) returns (ReadyResponse); -} - -/** - * SourceTransformerRequest represents a request element. - */ -message SourceTransformRequest { - repeated string keys = 1; - bytes value = 2; - google.protobuf.Timestamp event_time = 3; - google.protobuf.Timestamp watermark = 4; -} - -/** - * SourceTransformerResponse represents a response element. - */ -message SourceTransformResponse { - message Result { - repeated string keys = 1; - bytes value = 2; - google.protobuf.Timestamp event_time = 3; - repeated string tags = 4; - } - repeated Result results = 1; -} - -/** - * ReadyResponse is the health check result. - */ -message ReadyResponse { - bool ready = 1; -} \ No newline at end of file