mac

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2025 License: Apache-2.0 Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	DefaultArch      = "m2"
	DefaultOSVersion = "15"
)

Variables

This section is empty.

Functions

func Destroy

func Destroy(ctx *maptContext.ContextArgs, 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(ctx *maptContext.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

func Request

func Request(ctx *maptContext.ContextArgs, r *MacRequestArgs) error

Request could be interpreted as a general way to create / get a machine

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 MacRequestArgs added in v0.8.0

type MacRequestArgs 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
}

Jump to

Keyboard shortcuts

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