Documentation ¶
Index ¶
Constants ¶
const ( AccountNameInvalid = "AccountNameInvalid" AlreadyExists = "AlreadyExists" AsyncOpIncompleteError = "AsyncOpIncomplete" BadRequest = "BadRequest" CannotParseError = "CannotParseError" ConflictingServerOperation = "ConflictingServerOperation" ContainerOperationFailure = "ContainerOperationFailure" ConsumerGroupNotFound = "ConsumerGroupNotFound" CreationPending = "CreationPending" FailoverGroupBusy = "FailoverGroupBusy" Forbidden = "Forbidden" InvalidAccessPolicy = "InvalidAccessPolicy" InvalidCIDRNotation = "InvalidCIDRNotation" InvalidFailoverGroupRegion = "InvalidFailoverGroupRegion" InvalidParameters = "InvalidParameters" InvalidRequestFormat = "InvalidRequestFormat" InvalidResourceLocation = "InvalidResourceLocation" InvalidServerName = "InvalidServerName" InvalidResourceReference = "InvalidResourceReference" KeyNotFound = "KeyNotFound" LocationNotAvailableForResourceType = "LocationNotAvailableForResourceType" ProvisioningDisabled = "ProvisioningDisabled" NetcfgInvalidIPAddressPrefix = "NetcfgInvalidIPAddressPrefix" NetcfgInvalidSubnet = "NetcfgInvalidSubnet" NetcfgInvalidVirtualNetworkSite = "NetcfgInvalidVirtualNetworkSite" NotFoundErrorCode = "NotFound" NoSuchHost = "no such host" ParentNotFoundErrorCode = "ParentResourceNotFound" StorageAccountIsNotProvisioned = "StorageAccountIsNotProvisioned" PreconditionFailed = "PreconditionFailed" QuotaExceeded = "QuotaExceeded" ResourceGroupNotFoundErrorCode = "ResourceGroupNotFound" RegionDoesNotAllowProvisioning = "RegionDoesNotAllowProvisioning" ResourceNotFound = "ResourceNotFound" RequestConflictError = "Conflict" ValidationError = "ValidationError" SubscriptionDoesNotHaveServer = "SubscriptionDoesNotHaveServer" NotSupported = "NotSupported" SecretNotFound = "SecretNotFound" RequestDisallowedByPolicy = "RequestDisallowedByPolicy" ServiceBusy = "ServiceBusy" NameNotAvailable = "NameNotAvailable" PublicIPIdleTimeoutIsOutOfRange = "PublicIPIdleTimeoutIsOutOfRange" InvalidRequestContent = "InvalidRequestContent" InvalidMaxSizeTierCombination = "InvalidMaxSizeTierCombination" InternalServerError = "InternalServerError" NetworkAclsValidationFailure = "NetworkAclsValidationFailure" SubnetHasServiceEndpointWithInvalidServiceName = "SubnetHasServiceEndpointWithInvalidServiceName" InvalidAddressPrefixFormat = "InvalidAddressPrefixFormat" FeatureNotSupportedForEdition = "FeatureNotSupportedForEdition" VirtualNetworkRuleBadRequest = "VirtualNetworkRuleBadRequest" LongTermRetentionPolicyInvalid = "LongTermRetentionPolicyInvalid" BackupRetentionPolicyInvalid = "InvalidBackupRetentionPeriod" OperationIdNotFound = "OperationIdNotFound" ObjectIsBeingDeleted = "ObjectIsBeingDeleted" ObjectIsDeletedButRecoverable = "ObjectIsDeletedButRecoverable" )
Variables ¶
var ErrIdsRegex *regexp.Regexp
ErrIdsRegex is used to find and remove uuids from errors
var ErrTimesRegex *regexp.Regexp
ErrTimesRegex allows timestamp seconds to be removed from error strings
Functions ¶
func IsErrorFatal ¶
func IsErrorFatal(err error, allowedErrorTypes []string, unrecoverableErrorTypes []string) (bool, error)
IsErrorFatal checks the given error against the provided list of allowed and unrecoverable error types.
- Allowed errors are NOT fatal and no error is returned. When returned to the async_reconciler this means that reconciliation is reattempted.
- Unrecoverable errors are fatal. When returned to the async_reconciler reconciliation is stopped until a new modification is made to the resource in question. This is useful for things like client errors that no amount of reconciliation will fix.
If an error is not in the allowed list and also not in the unrecoverable list, it is classified as nonfatal, but an error is returned. When returned to the async_reconciler, reconciliation will continue but an error will be logged.
func StripErrorIDs ¶
StripErrorIDs takes an error and returns its string representation after filtering some common ID patterns
func StripErrorTimes ¶
StripErrorTimes removes the hours:minutes:seconds from a date to prevent updates to Status.Message from changing unnecessarily
Types ¶
type AdminSecretNotFound ¶
type AdminSecretNotFound struct {
Name string
}
func NewAdminSecretNotFoundError ¶
func NewAdminSecretNotFoundError(name string) *AdminSecretNotFound
func (AdminSecretNotFound) Error ¶
func (e AdminSecretNotFound) Error() string
type AzureError ¶
func NewAzureError ¶
func NewAzureError(err error) *AzureError
func (AzureError) Error ¶
func (e AzureError) Error() string