Documentation
¶
Overview ¶
Package failurereport describes why an asset failed in one machine-readable line, so that Bruin Cloud can decide whether to retry it from the error's type rather than its message.
Index ¶
Constants ¶
View Source
const ( // Transient failures are usually fixed by running the asset again: server errors, rate limits. Transient = "transient" // Infra failures come from what Bruin runs on, such as the secrets backend. Infra = "infra" // MissingConnection means the asset uses a connection that doesn't exist. MissingConnection = "missing_connection" // Connection means a connection exists but its credentials are rejected. Connection = "connection" // Permission means the account lacks access in the warehouse or service. Permission = "permission" // ProviderLimits means the provider account needs action, such as enabling billing. ProviderLimits = "provider_limits" // UserCode means the asset's query or configuration has to change. UserCode = "user_code" // DataNotReady means a sensor's condition wasn't met before its timeout. DataNotReady = "data_not_ready" // AssetTimeout means the asset ran longer than its timeout. AssetTimeout = "asset_timeout" Unknown = "unknown" )
Classes of failures.
View Source
const Prefix = "bruin-failure: "
Prefix starts the line that carries a Report.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Report ¶
type Report struct {
Asset string `json:"asset"`
Class string `json:"class"`
Code string `json:"code,omitempty"`
Source string `json:"source,omitempty"`
Reason string `json:"reason,omitempty"`
HTTPStatus int `json:"http_status,omitempty"`
SQLState string `json:"sqlstate,omitempty"`
Connection string `json:"connection,omitempty"`
// ErrorType is the Go type of the innermost error, to find failures worth classifying.
ErrorType string `json:"error_type,omitempty"`
}
Report says why an asset failed. Class and Code are the classification; the other fields carry what it was made from, so the reader can classify differently without a new Bruin release.
Click to show internal directories.
Click to hide internal directories.