mirror of
https://github.com/psviderski/uncloud.git
synced 2026-08-26 19:13:34 +00:00
35 lines
774 B
Protocol Buffer
35 lines
774 B
Protocol Buffer
syntax = "proto3";
|
|
|
|
package api;
|
|
|
|
option go_package = "github.com/psviderski/uncloud/internal/machine/api/pb";
|
|
|
|
import "google/protobuf/empty.proto";
|
|
import "internal/machine/api/pb/common.proto";
|
|
import "internal/machine/api/pb/cluster.proto";
|
|
|
|
service Machine {
|
|
rpc InitCluster(InitClusterRequest) returns (InitClusterResponse);
|
|
rpc JoinCluster(JoinClusterRequest) returns (google.protobuf.Empty);
|
|
rpc Token(google.protobuf.Empty) returns (TokenResponse);
|
|
}
|
|
|
|
message InitClusterRequest {
|
|
string machineName = 1;
|
|
IPPrefix network = 2;
|
|
User user = 3;
|
|
}
|
|
|
|
message InitClusterResponse {
|
|
MachineInfo machine = 1;
|
|
}
|
|
|
|
message JoinClusterRequest {
|
|
MachineInfo machine = 1;
|
|
repeated MachineInfo other_machines = 3;
|
|
}
|
|
|
|
message TokenResponse {
|
|
string token = 1;
|
|
}
|