Versions in this module Expand all Collapse all v1 v1.0.0 May 3, 2023 Changes in this version + var ErrInvalidSubscriber = errors.New("invalid subscriber") + type Subscriber interface + Handle func(ctx context.Context, message *nats.Msg) error + type SubscriberController struct + func NewSubscriberController(conn *nats.Conn, interceptors ...SubscriberInterceptor) *SubscriberController + func (c *SubscriberController) AddQueueSubscriber(params []SubscriberParam) error + func (c *SubscriberController) Serve() + type SubscriberHandler func(ctx context.Context, subscriber *SubscriberImpl) error + type SubscriberImpl struct + Method string + Queue string + Subject string + func NewSubscriber(ctrl *SubscriberController, subj, queue string, subscriber Subscriber) *SubscriberImpl + func (c *SubscriberImpl) HandleMessage(message *nats.Msg) + type SubscriberInterceptor func(ctx context.Context, subscriber *SubscriberImpl, handler SubscriberHandler) error + func SubscriberChain(interceptors ...SubscriberInterceptor) SubscriberInterceptor + type SubscriberParam struct + Queue string + Subject string + Subscriber Subscriber