Documentation ¶
Overview ¶
Package queues presents interface (and its implementation sets) of a queues.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectedError ¶
type ConnectedError struct {
// contains filtered or unexported fields
}
ConnectedError typifies error "race condition".
func NewConnectedError ¶
func NewConnectedError(cause error) *ConnectedError
NewConnectedError - constructor ConnectedError based on the cause of the error.
func (*ConnectedError) Error ¶
func (ce *ConnectedError) Error() string
Error returns an error message.
func (*ConnectedError) Format ¶
func (ce *ConnectedError) Format(s fmt.State, v rune)
Format satisfies the interface fmt.Formatter.
func (*ConnectedError) FormatError ¶
func (ce *ConnectedError) FormatError(p xerrors.Printer) (next error)
FormatError satisfies the interface xerrors.Formatter.
func (*ConnectedError) Unwrap ¶
func (ce *ConnectedError) Unwrap() error
Unwrap satisfies the interface xerrors.Wrapper.
type Message ¶
type Message interface { // Body - provides the message body. Body() []byte // Timestamp - provides the message timestamp. Timestamp() int64 // AttemptsCount provides message attempts count. AttemptsCount() uint16 // QueueAddr - provides queue addr. QueueAddr() string // HasResponded - indicates whether or not this message has been responded to. HasResponded() bool // DisableAutoResponse - disables the automatic response that would normally be sent when a handler. DisableAutoResponse() // Touch - sends a touch command. Touch() // RequeueWithoutBackoff - sent this message, using the supplied delay. RequeueWithoutBackoff(delay time.Duration) // Finish - sends a finish command. Finish() // Context - provides message context. Context() context.Context // Subject - provides the message Subject. Subject() string }
Message predetermines the message type for handler.
type Publisher ¶
type Publisher interface { // Publish - publish message. Publish(ctx context.Context, subj string, body []byte) error }
Publisher predetermines the type of the basic function of the publish action.
type QueueManager ¶
type QueueManager interface { Publisher Pinger // Subscribe - subscribe to subj. Return Subscriber. Subscribe(ctx context.Context, subj string, handler Handler) (Subscriber, error) // Unsubscribe - unsubscribe Queue. Unsubscribe(ctx context.Context) // Stop - stop Queue. Stop(ctx context.Context) }
QueueManager provides an interface for managing queue.
Click to show internal directories.
Click to hide internal directories.