Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Broadcaster ¶
type Broadcaster struct {
// contains filtered or unexported fields
}
func NewBroadcaster ¶
func NewBroadcaster(opts *BroadcasterOptions) (*Broadcaster, error)
func (*Broadcaster) Broadcast ¶
func (nb *Broadcaster) Broadcast(ctx context.Context, message *bus.OutboundMessage) error
type BroadcasterOptions ¶
type BroadcasterOptions struct { NATSAddress string Logger *zap.SugaredLogger OTelPropagator propagation.TextMapPropagator }
type Options ¶
type Options struct { NATSAddress string Logger *zap.Logger Streams []nats.StreamConfig OTelPropagator propagation.TextMapPropagator }
type SubscribeBroadcastOpts ¶
type SubscribeBroadcastOpts struct { MessageBuffer int Deserializer serialization.Serializer }
type SubscribeOpts ¶
type SubscribeOpts struct { CreateConsumer bool ConsumerName string DurableName string DeliverPolicy *jetstream.DeliverPolicy // Deprecated: only use for nats < 2.10 FilterSubject string // use filter subjects for nats >= 2.10 FilterSubjects []string MaxAckPending int MaxDeliverTries int MessageBuffer int Deserializer serialization.Serializer }
type Subscriber ¶
type Subscriber struct {
// contains filtered or unexported fields
}
func NewSubscriber ¶
func NewSubscriber(opts *SubscriberOptions) (*Subscriber, error)
func (*Subscriber) Subscribe ¶
func (ns *Subscriber) Subscribe(ctx context.Context, streamName string, opts *SubscribeOpts) (*bus.Subscription, error)
func (*Subscriber) SubscribeBroadcast ¶
func (ns *Subscriber) SubscribeBroadcast(ctx context.Context, subject string, opts *SubscribeBroadcastOpts) (*bus.Subscription, error)
type SubscriberOptions ¶
type SubscriberOptions struct { NATSAddress string OTelPropagator propagation.TextMapPropagator }
Click to show internal directories.
Click to hide internal directories.