2019-06-18 18:51:52 +01:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package go.micro.client;
|
|
|
|
|
2019-08-23 12:06:11 +01:00
|
|
|
// Client is the micro client interface
|
|
|
|
service Client {
|
2019-06-18 18:51:52 +01:00
|
|
|
// Call allows a single request to be made
|
|
|
|
rpc Call(Request) returns (Response) {};
|
|
|
|
// Stream is a bidirectional stream
|
|
|
|
rpc Stream(stream Request) returns (stream Response) {};
|
|
|
|
// Publish publishes a message and returns an empty Message
|
|
|
|
rpc Publish(Message) returns (Message) {};
|
|
|
|
}
|
|
|
|
|
|
|
|
message Request {
|
|
|
|
string service = 1;
|
|
|
|
string endpoint = 2;
|
|
|
|
string content_type = 3;
|
|
|
|
bytes body = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Response {
|
|
|
|
bytes body = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Message {
|
|
|
|
string topic = 1;
|
|
|
|
string content_type = 2;
|
|
|
|
bytes body = 3;
|
|
|
|
}
|