heimdall/api/v1/heimdall.proto

52 lines
1.3 KiB
Protocol Buffer
Raw Normal View History

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"];
string cluster_key = 2;
}
message ConnectResponse {
Master master = 1;
}
message Node {
string id = 1 [(gogoproto.customname) = "ID"];
string addr = 2;
string private_key = 3;
uint64 listen_port = 4;
string gateway_address = 5;
}
message NodesRequest {}
message NodesResponse {
repeated Node nodes = 1;
}
message Peer {
string private_key = 1;
string public_key = 2;
repeated string allowed_ips = 3 [(gogoproto.customname) = "AllowedIPs"];
string endpoint = 4;
}