Versions in this module Expand all Collapse all v0 v0.0.14 Jan 4, 2023 Changes in this version + var ErrInvalidMessageHandler = errors.New("invalid message handler provided") + func NewNsqHandler(ctx context.Context, n *Nsq, topic string, handler broker.Handler) *nsqHandler + func NewNsqSubscriber(n *Nsq, topic string, opts ...broker.SubscribeOption) *subscriber + func WithChannelName(name string) broker.SubscribeOption + type Config struct + Lookupd Lookupd + Producer Producer + func NewConfig() *Config + func (c *Config) Channel(topic string) string + func (c *Config) NSQConfig() *nsq.Config + func (c *Config) UnmarshalEnv(es env.EnvSet) error + type Initializer struct + func NewInitializer(n *Nsq) *Initializer + func (i *Initializer) AddDependency(dep interface{}) error + func (i *Initializer) CanRun() bool + func (i *Initializer) CanStop() bool + func (i *Initializer) Dependencies() []string + func (i *Initializer) Run(ctx context.Context) error + func (i *Initializer) Stop(ctx context.Context) error + type Lookupd struct + Host string + Port string + func (l *Lookupd) Address() string + type Nsq struct + Consumers map[string]*nsq.Consumer + Producer *nsq.Producer + func NewNsq() *Nsq + func (n *Nsq) HasInitializer() bool + func (n *Nsq) Initializer() component.Initializer + func (n *Nsq) Logger() logger.Logger + func (n *Nsq) Publish(ctx context.Context, topic string, message interface{}, ...) error + func (n *Nsq) String() string + func (n *Nsq) Subscribe(ctx context.Context, topic string, handler broker.Handler, ...) error + func (n *Nsq) Unsubscribe(topic string) error + type Producer struct + Host string + Port string + func (p *Producer) Address() string