Skip to content

Commit

Permalink
seperate server/proto
Browse files Browse the repository at this point in the history
Signed-off-by: Sidhant Kohli <[email protected]>
  • Loading branch information
Sidhant Kohli committed Jul 2, 2024
1 parent 5b76519 commit db01722
Show file tree
Hide file tree
Showing 22 changed files with 1,791 additions and 0 deletions.
456 changes: 456 additions & 0 deletions pkg/apis/proto/batchmap/v1/batchmap.pb.go

Large diffs are not rendered by default.

52 changes: 52 additions & 0 deletions pkg/apis/proto/batchmap/v1/batchmap.proto
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
syntax = "proto3";

option go_package = "github.com/numaproj/numaflow-go/pkg/apis/proto/batchmap/v1";

import "google/protobuf/empty.proto";
import "google/protobuf/timestamp.proto";

package batchmap.v1;

service BatchMap {
// IsReady is the heartbeat endpoint for gRPC.
rpc IsReady(google.protobuf.Empty) returns (ReadyResponse);

// BatchMapFn is a bi-directional streaming rpc which applies a
// Map function on each BatchMapRequest element of the stream and then returns streams
// back MapResponse elements.
rpc BatchMapFn(stream BatchMapRequest) returns (stream BatchMapResponse);
}

/**
* MapRequest represents a request element.
*/
message BatchMapRequest {
repeated string keys = 1;
bytes value = 2;
google.protobuf.Timestamp event_time = 3;
google.protobuf.Timestamp watermark = 4;
map<string, string> headers = 5;
// This ID is used uniquely identify a map request
string id = 6;
}

/**
* MapResponse represents a response element.
*/
message BatchMapResponse {
message Result {
repeated string keys = 1;
bytes value = 2;
repeated string tags = 3;
}
repeated Result results = 1;
// This ID is used to refer the responses to the request it corresponds to.
string id = 2;
}

/**
* ReadyResponse is the health check result.
*/
message ReadyResponse {
bool ready = 1;
}
183 changes: 183 additions & 0 deletions pkg/apis/proto/batchmap/v1/batchmap_grpc.pb.go

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

Loading

0 comments on commit db01722

Please sign in to comment.