macpool

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: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Create

func Create(mCtxArgs *mc.ContextArgs, r *MacPoolRequestArgs) error

Even if we want to destroy the pool we will set params to max size 0

func Destroy

func Destroy(mCtxArgs *mc.ContextArgs) error

TODO decide how to destroy machines in the pool as they may need to wait to reach 24 hours

func HouseKeeper

func HouseKeeper(mCtxArgs *mc.ContextArgs, r *MacPoolRequestArgs) error

House keeper is the function executed serverless to check if is there any machine non locked which had been running more than 24h. It should check if capacity allows to remove the machine

func Release

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

func Request

func Request(mCtxArgs *mc.ContextArgs, r *RequestMachineArgs) error

Types

type MacPoolRequestArgs

type MacPoolRequestArgs 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

	// Pool specs
	PoolName     string
	Architecture string
	OSVersion    string
	// Pool params
	// Capacity is the number of machines in the pool ready to process a workload
	// at any given time
	OfferedCapacity int
	// Max is the max capacity of machines in the pool. Even if capacity is not meet if number of machines
	// are equal to max it will not create more machines
	MaxSize int
	// If fixed location is set machines only created on current region, in case no capacity it will not
	// create on different regions
	FixedLocation bool
}

type ReleaseMachineArgs

type ReleaseMachineArgs struct {
}

type RequestMachineArgs

type RequestMachineArgs struct {
	PoolName     string
	Architecture string
	OSVersion    string
	// If timeout is set a severless scheduled task will be created to self destroy the resources
	Timeout string
}

Jump to

Keyboard shortcuts

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