Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type NatsSubscription ¶
NatsSubscription encapsulates the jetstream session providing events.
Extends Router.
func NewNatsSubscription ¶
func NewNatsSubscription(handler *apievent.EventsHandler) *NatsSubscription
NewNatsSubscription creates a new NatsSubscription with the given user store.
func (*NatsSubscription) Close ¶
func (n *NatsSubscription) Close() error
Close cleanly brings down the nats and jetstream connection.
func (*NatsSubscription) Connect ¶
func (n *NatsSubscription) Connect(ctx context.Context, connStr string) error
Connect sets up the connection to the nats server and a consumer for the "Jetstream".
Fails if connection fails or the "Jetstream" consumer cannot be set up.
Once connected, it will attempt to reconnect if disconnected.
Click to show internal directories.
Click to hide internal directories.