util

package
v0.9.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	StackDedicatedHost = "stackDedicatedHost"
	StackMacMachine    = "stackMacMachine"
)

Variables

This section is empty.

Functions

func IsMachineLocked

func IsMachineLocked(h *mac.HostInformation) (bool, error)

func PickHost

func PickHost(prefix string, his []*mac.HostInformation) (*mac.HostInformation, error)

We will get a list of hosts from the pool ordered by allocation time We will apply several rules on them to pick the right one - TODO Remove those with allocation time > 24 h as they may destroyed - if none left use them again - if more available pick in order the first without lock

func Release

func Release(ctx *mc.ContextArgs, hostID string) error

Release will use dedicated host ID as identifier

It will get the info for the dedicated host get backedURL (tag on the dh) get projectName (tag on the dh) load machine stack based on those params run release update on it

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL