Created
May 1, 2023 21:50
-
-
Save breadchris/34508f27386abacf4cedd2e0b7238234 to your computer and use it in GitHub Desktop.
Experimental Protobuf definition for all graph data.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
syntax = "proto3"; | |
import "google/protobuf/empty.proto"; | |
import "google/protobuf/descriptor.proto"; | |
import "block.proto"; | |
import "resource.proto"; | |
enum ServiceMethods { | |
ServiceOne_MethodOne = 0; | |
} | |
message MethodOneResponse { | |
string message = 1; | |
} | |
service RemoteService { | |
rpc ExternalMethod (google.protobuf.Empty) returns (MethodOneResponse) { | |
option (protoflow) = { | |
name: "External Method", | |
}; | |
option (resource_info) = { | |
grpc_service: { | |
host: "localhost:50051" | |
} | |
}; | |
option (graph_data) = { | |
x: 1.0 | |
y: 2.0 | |
}; | |
}; | |
} | |
service ServiceOne { | |
rpc MethodOne (block.Input) returns (MethodOneResponse); | |
rpc MethodTwo (MethodOneResponse) returns (google.protobuf.Empty) { | |
option (protoflow) = { | |
name: "Transform Method One", | |
receives: [ | |
ServiceOne_MethodOne | |
] | |
}; | |
option (graph_data) = { | |
x: 1.0 | |
y: 2.0 | |
}; | |
}; | |
} | |
service ServiceTwo { | |
rpc MethodTwo (MethodOneResponse) returns (google.protobuf.Empty) { | |
option (protoflow) = { | |
name: "Do something with Method One", | |
receives: [ | |
ServiceOne_MethodOne | |
] | |
}; | |
option (graph_data) = { | |
x: 1.0 | |
y: 2.0 | |
}; | |
}; | |
} | |
// Definition of the `build.info` custom option | |
extend google.protobuf.MethodOptions { | |
Runtime protoflow = 1; | |
GraphData graph_data = 2; | |
resource.Resource resource_info = 3; | |
} | |
// Definition of the `BuildMetadata` message used in `build.info` | |
message Runtime { | |
string name = 1; | |
repeated ServiceMethods receives = 2; | |
} | |
message GraphData { | |
float x = 1; | |
float y = 2; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment