Documentation ¶
Overview ¶
Package quota provides functions to fetch and check quotas for various cloud environments.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Constraint ¶
type Constraint struct { Name string // This should be global or specific region. Region string // Count is the number of the resource that is required // to be free for use. Count int64 }
Constraint defines a check against availablity for a resource quota.
type ConstraintReport ¶
type ConstraintReport struct { For *Constraint Result ConstraintReportResult Message string }
ConstraintReport provides result for a given constraint.
func Check ¶
func Check(quotas []Quota, checks []Constraint) ([]ConstraintReport, error)
Check returns whether the checks constraints are possible gives the quotas. It returns an erros when any one of the constraint's result was `NotAvailable` or `Unknown`
type ConstraintReportResult ¶
type ConstraintReportResult string
ConstraintReportResult provide one word result for the constraint
const ( // Available corresponds to a constraint that is available. Available ConstraintReportResult = "Available" // AvailableButLow corresponds to a constraint that is available but there is very low overhead after satisfying the constraint. AvailableButLow ConstraintReportResult = "AvailableButLow" // NotAvailable corresponds to a constraint that is not available. NotAvailable ConstraintReportResult = "NotAvailable" // Unknown corresponds to a constraint that could not be calculated. Unknown ConstraintReportResult = "Unknown" )
Click to show internal directories.
Click to hide internal directories.