add rpc method for moving node
This commit is contained in:
parent
02a78e5a45
commit
47c72a4e2e
7 changed files with 510 additions and 151 deletions
|
@ -104,6 +104,12 @@ service HeadscaleService {
|
|||
get: "/api/v1/machine"
|
||||
};
|
||||
}
|
||||
|
||||
rpc MoveMachine(MoveMachineRequest) returns (MoveMachineResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/api/v1/machine/{machine_id}/namespace"
|
||||
};
|
||||
}
|
||||
// --- Machine end ---
|
||||
|
||||
// --- Route start ---
|
||||
|
|
|
@ -22,7 +22,6 @@ message Machine {
|
|||
string name = 6;
|
||||
Namespace namespace = 7;
|
||||
|
||||
|
||||
google.protobuf.Timestamp last_seen = 8;
|
||||
google.protobuf.Timestamp last_successful_update = 9;
|
||||
google.protobuf.Timestamp expiry = 10;
|
||||
|
@ -80,6 +79,15 @@ message ListMachinesResponse {
|
|||
repeated Machine machines = 1;
|
||||
}
|
||||
|
||||
message MoveMachineRequest {
|
||||
uint64 machine_id = 1;
|
||||
string namespace = 2;
|
||||
}
|
||||
|
||||
message MoveMachineResponse {
|
||||
Machine machine = 1;
|
||||
}
|
||||
|
||||
message DebugCreateMachineRequest {
|
||||
string namespace = 1;
|
||||
string key = 2;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue