feat(pre-deploy): implement pre-deploy hook operations for deployment

This commit is contained in:
Pasha Sviderski
2026-04-08 19:16:42 +10:00
parent 1c8b77054a
commit 772b31b57f
6 changed files with 505 additions and 1 deletions
+8
View File
@@ -67,3 +67,11 @@ func (s *ClusterState) Machine(nameOrID string) (*Machine, bool) {
}
return nil, false
}
// MachineName returns the machine name by ID from the cluster state. If the id is not found, ("", false) is returned.
func (s *ClusterState) MachineName(id string) (string, bool) {
if m, ok := s.Machine(id); ok {
return m.Info.Name, true
}
return "", false
}