2019-10-03 13:49:23 +00:00
|
|
|
syntax = "proto3";
|
|
|
|
|
|
|
|
package io.stellarproject.heimdall.api.v1;
|
|
|
|
|
|
|
|
import "gogoproto/gogo.proto";
|
|
|
|
//import "google/protobuf/empty.proto";
|
|
|
|
//import "google/protobuf/any.proto";
|
|
|
|
|
|
|
|
option go_package = "github.com/stellarproject/heimdall/api/v1;v1";
|
|
|
|
|
|
|
|
service Heimdall {
|
|
|
|
rpc Connect(ConnectRequest) returns (ConnectResponse);
|
|
|
|
//rpc Nodes(NodesRequest) returns (NodesResponse);
|
|
|
|
//rpc Peers(PeersRequest) returns (PeersResponse);
|
|
|
|
}
|
|
|
|
|
|
|
|
message Master {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
string grpc_address = 2 [(gogoproto.customname) = "GRPCAddress"];
|
|
|
|
string redis_url = 3 [(gogoproto.customname) = "RedisURL"];
|
|
|
|
}
|
|
|
|
|
|
|
|
message ConnectRequest {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
2019-10-03 14:10:50 +00:00
|
|
|
string cluster_key = 2;
|
2019-10-03 13:49:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message ConnectResponse {
|
|
|
|
Master master = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Node {
|
|
|
|
string id = 1 [(gogoproto.customname) = "ID"];
|
|
|
|
string addr = 2;
|
2019-10-04 11:47:16 +00:00
|
|
|
string private_key = 3;
|
|
|
|
uint64 listen_port = 4;
|
|
|
|
string gateway_address = 5;
|
2019-10-03 13:49:23 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
message NodesRequest {}
|
|
|
|
|
|
|
|
message NodesResponse {
|
|
|
|
repeated Node nodes = 1;
|
|
|
|
}
|
2019-10-04 11:47:16 +00:00
|
|
|
|
|
|
|
message Peer {
|
|
|
|
string private_key = 1;
|
|
|
|
string public_key = 2;
|
|
|
|
repeated string allowed_ips = 3 [(gogoproto.customname) = "AllowedIPs"];
|
|
|
|
string endpoint = 4;
|
|
|
|
}
|