|
- syntax = "proto3";
-
- package agents;
-
- import "cloudevent.proto";
- import "google/protobuf/any.proto";
-
- message TopicId {
- string type = 1;
- string source = 2;
- }
-
- message AgentId {
- string type = 1;
- string key = 2;
- }
-
- message Payload {
- string data_type = 1;
- string data_content_type = 2;
- bytes data = 3;
- }
-
- message RpcRequest {
- string request_id = 1;
- optional AgentId source = 2;
- AgentId target = 3;
- string method = 4;
- Payload payload = 5;
- map<string, string> metadata = 6;
- }
-
- message RpcResponse {
- string request_id = 1;
- Payload payload = 2;
- string error = 3;
- map<string, string> metadata = 4;
- }
-
- message Event {
- string topic_type = 1;
- string topic_source = 2;
- optional AgentId source = 3;
- Payload payload = 4;
- map<string, string> metadata = 5;
- }
-
- message RegisterAgentType {
- string type = 1;
- }
-
- message TypeSubscription {
- string topic_type = 1;
- string agent_type = 2;
- }
-
- message Subscription {
- oneof subscription {
- TypeSubscription typeSubscription = 1;
- }
- }
-
- message AddSubscription {
- Subscription subscription = 1;
- }
-
- service AgentRpc {
- rpc OpenChannel (stream Message) returns (stream Message);
- }
-
- message Message {
- oneof message {
- RpcRequest request = 1;
- RpcResponse response = 2;
- Event event = 3;
- RegisterAgentType registerAgentType = 4;
- AddSubscription addSubscription = 5;
- cloudevent.CloudEvent cloudEvent = 6;
- }
- }
|