Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AutoscalerError ¶
type AutoscalerError struct {
// contains filtered or unexported fields
}
AutoscalerError contains information about Autoscaler errors
func NewAutoscalerError ¶
func NewAutoscalerError(errorType AutoscalerErrorType, msg string, args ...interface{}) *AutoscalerError
NewAutoscalerError returns new autoscaler error with a message constructed from format string
func ToAutoscalerError ¶
func ToAutoscalerError(defaultType AutoscalerErrorType, err error) *AutoscalerError
ToAutoscalerError converts an error to AutoscalerError with given type, unless it already is an AutoscalerError (in which case it's not modified).
func (*AutoscalerError) AddPrefix ¶
func (e *AutoscalerError) AddPrefix(msg string, args ...interface{}) *AutoscalerError
AddPrefix adds a prefix to error message. Returns the error it's called for convienient inline use. Example:
if err := DoSomething(myObject); err != nil { return err.AddPrefix("can't do something with %v: ", myObject) }
func (*AutoscalerError) Error ¶
func (e *AutoscalerError) Error() string
Error implements golang error interface
func (*AutoscalerError) Type ¶
func (e *AutoscalerError) Type() AutoscalerErrorType
Type returns the typ of AutoscalerError
type AutoscalerErrorType ¶
type AutoscalerErrorType string
AutoscalerErrorType describes a high-level category of a given error
const ( // CloudProviderError is an error related to underlying infrastructure CloudProviderError AutoscalerErrorType = "cloudProviderError" // ApiCallError is an error related to communication with k8s API server ApiCallError AutoscalerErrorType = "apiCallError" // InternalError is an error inside Cluster Autoscaler InternalError AutoscalerErrorType = "internalError" // TransientError is an error that causes us to skip a single loop, but // does not require any additional action. TransientError AutoscalerErrorType = "transientError" )
Click to show internal directories.
Click to hide internal directories.