Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterReporter ¶
func RegisterReporter(r ErrorReporter) error
RegisterReporter registers given reporter as global reporter. Returns an error if the reporter has already been registered.
Types ¶
type Error ¶
type Error string
Error type represents package level errors.
const ( // ErrNotFound indicates that requested entity can not be found. ErrNotFound Error = "not found" // ErrAlreadyExists indicates an attempt to create an entity // which is failed because such entity already exists. ErrAlreadyExists Error = "already exists" // ErrInvalidArgument indicates that client has specified an invalid argument. ErrInvalidArgument Error = "invalid argument" // ErrUnauthenticated indicates the request does not have valid // authentication credentials to perform the operation. ErrUnauthenticated Error = "authentication failed" // execute the specified operation. It must not be used if the caller // cannot be identified (use ErrUnauthenticated instead for those errors). ErrUnauthorized Error = "permission denied" // This kind of error is retryable. Caller should retry with a backoff. ErrUnavailable Error = "temporarily unavailable" // ErrConnFailed shows that connection to a resource failed. ErrConnFailed Error = "connection failed" )
type ErrorReporter ¶
type ErrorReporter interface {
Report(err error)
}
ErrorReporter reports about errors.
Click to show internal directories.
Click to hide internal directories.