Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct { Host string `envconfig:"BROKER_HOST"` Port string `envconfig:"BROKER_PORT"` User string `envconfig:"BROKER_USER"` Pass string `envconfig:"BROKER_PASS"` ClusterID string `envconfig:"BROKER_CLUSTER_ID"` Encoder string `envconfig:"BROKER_ENCODER" default:"json"` Timeout time.Duration `envconfig:"BROKER_TIMEOUT" default:"10s"` }
type Nats ¶
type Nats struct {
// contains filtered or unexported fields
}
func (*Nats) Subscribe ¶
func (n *Nats) Subscribe(subject string, handler stan.MsgHandler, subscriberName string) (io.Closer, error)
Subscribe will create a subscription on the given subject and process incoming messages using the specified stan.MsgHandler stan.MsgHandler should explicitly acknowledge the message in case of successful processing -> msg.Ack()
Click to show internal directories.
Click to hide internal directories.