Help us shape the future of Go! Take the 2026 Go Developer Survey

machinelimit

package
v0.4.123 Latest Latest
Warning

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

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

Documentation

Overview

Package machinelimit tells customers when their organization is close to its Machines limit, and where to ask for more.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppOrgSlug

func AppOrgSlug(ctx context.Context, appName string) string

AppOrgSlug finds the app's organization for callers that only know the app. It returns "" on any failure, which keeps Warn and WithRequestLink quiet.

func Refused

func Refused(err error) bool

Refused reports whether flaps turned down a Machine request. The Machine limit is one of the reasons it gives this status for.

func RequestURL

func RequestURL(orgSlug string) string

func Warn

func Warn(ctx context.Context, orgSlug string)

Warn prints one line to stderr when the organization is using 80% or more of its Machines limit. Any failure stays silent.

func WithRequestLink(ctx context.Context, err error, orgSlug string) error

WithRequestLink adds the request link when flaps refused a Machine and the organization is at its limit. It goes by the numbers rather than the wording of flaps' error, which carries no status code for this.

Types

This section is empty.

Jump to

Keyboard shortcuts

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