Documentation
¶
Index ¶
- Variables
- func NewConfigFieldError(field, message string) error
- func NewConnectionError(operation string, cause error) error
- func NewConsumeError(queue string, cause error) error
- func NewHandlerError(eventType, messageID string, cause error) error
- func NewPublishError(exchange, routingKey string, cause error) error
- func NewTopologyError(operation, resource string, cause error) error
- type ConfigError
- type ConnectionError
- type ConsumeError
- type HandlerError
- type PublishError
- type TopologyError
Constants ¶
This section is empty.
Variables ¶
var ( // ErrClientClosed is returned when attempting to use a closed client. ErrClientClosed = errors.New("rabbitmq: client is closed") // ErrNoConnection is returned when the client has no active connection. ErrNoConnection = errors.New("rabbitmq: no active connection") // ErrNoChannel is returned when the client has no active channel. ErrNoChannel = errors.New("rabbitmq: no active channel") // ErrMaxRetriesExceeded is returned when a message exceeds max retries. ErrMaxRetriesExceeded = errors.New("rabbitmq: max retries exceeded") // ErrNoHandlersRegistered is returned when StartConsume is called without registering any handlers. ErrNoHandlersRegistered = errors.New("rabbitmq: no handlers registered, call RegisterHandler before StartConsume") // ErrPublishNotConfirmed is returned when a message publish is not confirmed by RabbitMQ. ErrPublishNotConfirmed = errors.New("rabbitmq: message publish was not confirmed by broker") // ErrPublishConfirmTimeout is returned when waiting for publish confirmation times out. ErrPublishConfirmTimeout = errors.New("rabbitmq: timeout waiting for publish confirmation") )
Sentinel errors
Functions ¶
func NewConfigFieldError ¶
newConfigFieldError creates a new ConfigError for a specific field.
func NewConnectionError ¶
newConnectionError creates a new ConnectionError.
func NewConsumeError ¶
newConsumeError creates a new ConsumeError.
func NewHandlerError ¶
newHandlerError creates a new HandlerError.
func NewPublishError ¶
newPublishError creates a new PublishError.
func NewTopologyError ¶
newTopologyError creates a new TopologyError.
Types ¶
type ConfigError ¶
ConfigError represents a configuration validation error.
func (*ConfigError) Error ¶
func (e *ConfigError) Error() string
type ConnectionError ¶
ConnectionError represents a connection-related error.
func (*ConnectionError) Error ¶
func (e *ConnectionError) Error() string
func (*ConnectionError) Unwrap ¶
func (e *ConnectionError) Unwrap() error
type ConsumeError ¶
ConsumeError represents an error during message consumption.
func (*ConsumeError) Error ¶
func (e *ConsumeError) Error() string
func (*ConsumeError) Unwrap ¶
func (e *ConsumeError) Unwrap() error
type HandlerError ¶
HandlerError represents an error returned by a message handler.
func (*HandlerError) Error ¶
func (e *HandlerError) Error() string
func (*HandlerError) Unwrap ¶
func (e *HandlerError) Unwrap() error
type PublishError ¶
PublishError represents an error during message publishing.
func (*PublishError) Error ¶
func (e *PublishError) Error() string
func (*PublishError) Unwrap ¶
func (e *PublishError) Unwrap() error
type TopologyError ¶
type TopologyError struct {
Operation string // "declare_exchange", "declare_queue", "bind_queue"
Resource string // name of the exchange/queue
Cause error
}
TopologyError represents an error during topology setup (exchanges, queues, bindings).
func (*TopologyError) Error ¶
func (e *TopologyError) Error() string
func (*TopologyError) Unwrap ¶
func (e *TopologyError) Unwrap() error