Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GobMarshaler ¶
type GobMarshaler struct{}
GobMarshaler is marshaller which is using Gob to marshal Watermill messages.
type MarshalerUnmarshaler ¶
type MarshalerUnmarshaler interface { Marshaler Unmarshaler }
type NsqPublisher ¶
type NsqPublisher struct {
// contains filtered or unexported fields
}
func NewNsqPublisher ¶
func NewNsqPublisher(config NsqPublisherConfig, logger watermill.LoggerAdapter) (*NsqPublisher, error)
NewNsqPublisher creates a new NsqPublisher.
func (NsqPublisher) Close ¶
func (p NsqPublisher) Close() error
type NsqPublisherConfig ¶
type NsqPublisherConfig struct { NsqD string // nsq config *stdnsq.Config // Marshaler is marshaler used to marshal messages to stan format. Marshaler Marshaler }
func (NsqPublisherConfig) Validate ¶
func (c NsqPublisherConfig) Validate() error
type NsqSubscriber ¶
type NsqSubscriber struct {
// contains filtered or unexported fields
}
func NewNsqSubscriber ¶
func NewNsqSubscriber(config NsqSubscriberConfig, logger watermill.LoggerAdapter) (*NsqSubscriber, error)
func (*NsqSubscriber) Close ¶
func (s *NsqSubscriber) Close() error
type NsqSubscriberConfig ¶
type NsqSubscriberConfig struct { // nsq config // nsq increse MaxAttempts to avoid TestResendOnError, see github.com/ThreeDotsLabs/watermill/pubsub/tests/test_pubsub.go L54 *nsq.Config LookupdAddrs []string NsqdAddrs []string GroupName string // CloseTimeout determines how long subscriber will wait for Ack/Nack on close. // When no Ack/Nack is received after CloseTimeout, subscriber will be closed. CloseTimeout time.Duration // How long subscriber should wait for Ack/Nack. When no Ack/Nack was received, message will be redelivered. // It is mapped to stan.AckWait option. AckWaitTimeout time.Duration // Requeue delay, default 1s // RequeueTimeout time.Duration // Unmarshaler is an unmarshaler used to unmarshaling messages from NATS format to Watermill format. Unmarshaler Unmarshaler }
func (*NsqSubscriberConfig) Validate ¶
func (c *NsqSubscriberConfig) Validate() error
type Unmarshaler ¶
Click to show internal directories.
Click to hide internal directories.