Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Actor ¶
Actor represents a NATS client that can publish messages and subscribe to subjects.
func NewActor ¶
func NewActor(name string, options nats.Options, opts ...ActorOption) *Actor
NewActor creates a new Actor with the given name, NATS options, and optional ActorOptions.
type ActorOption ¶
type ActorOption func(*Actor)
func WithQueueSubscription ¶
func WithQueueSubscription(subject, queue string, handler func(*nats.Msg)) ActorOption
WithQueueSubscription adds a queue-group subscription to the Actor for the given subject, queue, and handler.
func WithSubscription ¶
func WithSubscription(subject string, handler func(*nats.Msg)) ActorOption
WithSubscription adds a subscription to the Actor for the given subject and handler.
Click to show internal directories.
Click to hide internal directories.