Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConsumerMetricStorage ¶
type ConsumerMetricStorage interface { ObserveConsumeDuration(exchange string, routingKey string, t time.Duration) ObserveConsumeMsgSize(exchange string, routingKey string, size int) IncRequeueCount(exchange string, routingKey string) IncDlqCount(exchange string, routingKey string) IncSuccessCount(exchange string, routingKey string) IncRetryCount(exchange string, routingKey string) }
type Middleware ¶
type Middleware func(next SyncHandlerAdapter) SyncHandlerAdapter
func Log ¶
func Log(logger log.Logger) Middleware
func Metrics ¶
func Metrics(metricStorage ConsumerMetricStorage) Middleware
type Result ¶
type Result struct { Ack bool Requeue bool RequeueTimeout time.Duration Retry bool MoveToDlq bool Err error }
type Sync ¶
type Sync struct {
// contains filtered or unexported fields
}
func NewSync ¶
func NewSync(logger log.Logger, adapter SyncHandlerAdapter, middlewares ...Middleware) Sync
type SyncHandlerAdapter ¶
Click to show internal directories.
Click to hide internal directories.