mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-01-05 21:09:07 +01:00
Added the gRPC proto file
This commit is contained in:
parent
91212e60cf
commit
d9dc0ba6b3
37
pkg/grpc/ctrlserver/ctrlserver.proto
Normal file
37
pkg/grpc/ctrlserver/ctrlserver.proto
Normal file
@ -0,0 +1,37 @@
|
||||
syntax = "proto3";
|
||||
package rpctypes;
|
||||
|
||||
option go_package = "pkg/ctrlserver/rpc";
|
||||
|
||||
service MeshCtrlServer {
|
||||
rpc GetMesh(GetMeshRequest) returns (GetMeshReply) {}
|
||||
rpc JoinMesh(JoinMeshRequest) returns (JoinMeshReply) {}
|
||||
}
|
||||
|
||||
message MeshNode {
|
||||
string publicKey = 1;
|
||||
string wgEndpoint = 2;
|
||||
string endpoint = 3;
|
||||
string wgHost = 4;
|
||||
}
|
||||
|
||||
message GetMeshRequest {
|
||||
string meshId = 1;
|
||||
}
|
||||
|
||||
message GetMeshReply {
|
||||
string meshId = 1;
|
||||
repeated MeshNode meshNode = 2;
|
||||
}
|
||||
|
||||
message JoinMeshRequest {
|
||||
string meshId = 1;
|
||||
int32 hostPort = 2;
|
||||
string publicKey = 3;
|
||||
int32 wgPort = 4;
|
||||
}
|
||||
|
||||
message JoinMeshReply {
|
||||
bool success = 1;
|
||||
optional string meshIp = 2;
|
||||
}
|
Loading…
Reference in New Issue
Block a user