mirror of
https://github.com/juanfont/headscale.git
synced 2025-08-26 00:17:48 +00:00
Implement ExpireMachine rpc
This commit is contained in:
@@ -262,6 +262,14 @@ func (h *Headscale) UpdateMachine(machine *Machine) error {
|
||||
return nil
|
||||
}
|
||||
|
||||
// ExpireMachine takes a Machine struct and sets the expire field to now.
|
||||
func (h *Headscale) ExpireMachine(machine *Machine) {
|
||||
now := time.Now()
|
||||
machine.Expiry = &now
|
||||
|
||||
h.db.Save(machine)
|
||||
}
|
||||
|
||||
// DeleteMachine softs deletes a Machine from the database.
|
||||
func (h *Headscale) DeleteMachine(machine *Machine) error {
|
||||
err := h.RemoveSharedMachineFromAllNamespaces(machine)
|
||||
|
Reference in New Issue
Block a user