mirror of
https://github.com/tim-beatham/smegmesh.git
synced 2025-08-14 07:18:32 +02:00
Added sync
This commit is contained in:
18
pkg/grpc/ctrlserver/authentication.proto
Normal file
18
pkg/grpc/ctrlserver/authentication.proto
Normal file
@ -0,0 +1,18 @@
|
||||
syntax = "proto3";
|
||||
package rpctypes;
|
||||
|
||||
option go_package = "pkg/rpc";
|
||||
|
||||
service Authentication {
|
||||
rpc JoinMesh(JoinAuthMeshRequest) returns (JoinAuthMeshReply) {}
|
||||
}
|
||||
|
||||
message JoinAuthMeshRequest {
|
||||
string meshId = 1;
|
||||
string alias = 2;
|
||||
}
|
||||
|
||||
message JoinAuthMeshReply {
|
||||
bool success = 1;
|
||||
optional string token = 2;
|
||||
}
|
@ -4,27 +4,10 @@ package rpctypes;
|
||||
option go_package = "pkg/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 {
|
||||
bytes mesh = 2;
|
||||
}
|
||||
|
||||
message JoinMeshRequest {
|
||||
bytes changes = 1;
|
||||
string meshId = 2;
|
||||
}
|
||||
|
||||
|
26
pkg/grpc/ctrlserver/syncservice.proto
Normal file
26
pkg/grpc/ctrlserver/syncservice.proto
Normal file
@ -0,0 +1,26 @@
|
||||
syntax = "proto3";
|
||||
package syncservice;
|
||||
|
||||
option go_package = "pkg/rpc";
|
||||
|
||||
service SyncService {
|
||||
rpc GetConf(GetConfRequest) returns (GetConfReply) {}
|
||||
rpc SyncMesh(SyncMeshRequest) returns (SyncMeshReply) {}
|
||||
}
|
||||
|
||||
message GetConfRequest {
|
||||
string meshId = 1;
|
||||
}
|
||||
|
||||
message GetConfReply {
|
||||
bytes mesh = 1;
|
||||
}
|
||||
|
||||
message SyncMeshRequest {
|
||||
string meshId = 1;
|
||||
bytes changes = 2;
|
||||
}
|
||||
|
||||
message SyncMeshReply {
|
||||
bool success = 1;
|
||||
}
|
Reference in New Issue
Block a user