Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DoubleStartError = errors.New("the subscription already started")
Functions ¶
Types ¶
type AutoSubscriber ¶
type AutoSubscriber interface { Subscriber GetHandler() AutoHandler }
func AsAutoSubscriber ¶
func AsAutoSubscriber(subscriber Subscriber, pin string) (AutoSubscriber, error)
func NewAutoSubscriber ¶
func NewAutoSubscriber( manager *connection.Manager, config *queue.DestinationConfig, pinName string, handler AutoHandler, metric string, ) AutoSubscriber
type ConfirmationHandler ¶
type DeliveryConfirmation ¶
type DeliveryConfirmation struct { Delivery *amqp.Delivery Timer *prometheus.Timer Logger zerolog.Logger }
func (DeliveryConfirmation) Confirm ¶
func (dc DeliveryConfirmation) Confirm() error
func (DeliveryConfirmation) Reject ¶
func (dc DeliveryConfirmation) Reject() error
type ManualSubscriber ¶
type ManualSubscriber interface { Subscriber GetHandler() ConfirmationHandler }
func AsManualSubscriber ¶
func AsManualSubscriber(subscriber Subscriber, pin string) (ManualSubscriber, error)
type MultiplySubscribeMonitor ¶
type MultiplySubscribeMonitor struct {
SubscriberMonitors []SubscriberMonitor
}
func (MultiplySubscribeMonitor) Unsubscribe ¶
func (sub MultiplySubscribeMonitor) Unsubscribe() error
type Subscriber ¶
func NewManualSubscriber ¶
func NewManualSubscriber( manager *connection.Manager, config *queue.DestinationConfig, pinName string, handler ConfirmationHandler, metric string, ) Subscriber
type SubscriberMonitor ¶
type SubscriberMonitor interface { queue.Monitor GetSubscriber() Subscriber }
func MonitorFor ¶
func MonitorFor(subscriber Subscriber) SubscriberMonitor
func SubscribeAll ¶
func SubscribeAll[T any]( router T, pinFoundByAttrs map[string]queue.DestinationConfig, logger *zerolog.Logger, subscribeFunc func(router T, pinName string) (SubscriberMonitor, error), ) ([]SubscriberMonitor, error)
type SubscriberType ¶
type SubscriberType = int
const ( AutoSubscriberType SubscriberType = iota ManualSubscriberType )
Click to show internal directories.
Click to hide internal directories.