Documentation
¶
Overview ¶
Package cost provides runner cost estimation for GitHub Actions.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BillableMinutes ¶
BillableMinutes returns the billable minutes for a job duration. Uses the default model.
func IsSelfHosted ¶
IsSelfHosted reports whether the labels indicate a self-hosted runner.
func LookupMultiplier ¶
LookupMultiplier returns the billing multiplier for a set of runner labels. Uses the default model.
Types ¶
type Model ¶
type Model struct {
// contains filtered or unexported fields
}
Model holds runner cost configuration. Use DefaultModel() for standard GitHub rates.
func DefaultModel ¶
func DefaultModel() Model
DefaultModel returns a Model with GitHub's published billing multipliers.
func (Model) BillableMinutes ¶
BillableMinutes returns the billable minutes for a job duration. GitHub rounds each job's duration up to the nearest whole minute.
func (Model) IsSelfHosted ¶
IsSelfHosted reports whether the labels indicate a self-hosted runner.
func (Model) LookupMultiplier ¶
LookupMultiplier returns the billing multiplier for a set of runner labels. Self-hosted runners return 0 (free on GitHub billing). Checks each label against the known multiplier table, then tries larger-runner pattern matching. Returns 1.0 (Linux default) if no match.