mac

package
v0.7.2 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BootstrapScript []byte

Functions

func Destroy

func Destroy(prefix, hostID string) error

Initial scenario consider 1 machine If we request destroy mac machine it will look for any machine and check if it is locked if not locked it will destroy it

func Release

func Release(prefix string, 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

func Request

func Request(r *MacRequest) error

Request could be interpreted as a general way to create / release

Some project will request a mac machine based on tags it will check if there is any existing mac machine (based on labels + arch + MaxPoolSize)

if dh machine exists and max pool size has been reached:

if it exists it will check if it is locked if no locked it will replace based on version TODO think how this would afferct airgap / proxy mechanism it locked it will (wait or return an error)

if dh does not exist or max pool size has not been reched create the machine

...

Types

type HostInformation

type HostInformation struct {
	Arch        *string
	BackedURL   *string
	ProjectName *string
	RunID       *string
	Region      *string
	Host        *ec2Types.Host
}

type MacRequest

type MacRequest struct {
	// Prefix for the resources related to mac
	// this is relevant in case of an orchestration with multiple
	// macs on the same stack
	Prefix string

	// Machine params
	Architecture string
	Version      string

	// Location params
	FixedLocation    bool
	Region           *string
	AvailabilityZone *string

	// Topology paras
	Airgap bool

	// setup as github actions runner
	SetupGHActionsRunner bool
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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