Documentation ¶
Overview ¶
Package hestan (hexa stan) in implementation of Nats-streaming broker for hexa SDK using stan client library of NATS.
hestan (hexa stan) in implementation of Nats-streaming broker for hexa SDK using stan client library of NATS.
Index ¶
- func ManualAckOption(waitDuration time.Duration) []stan.SubscriptionOption
- func NewEmitter(o EmitterOptions) (hevent.Emitter, error)
- func NewReceiver(o ReceiverOptions) (hevent.Receiver, error)
- func NewSubscriptionOptions(o SubscriptionOptions) *hevent.SubscriptionOptions
- func UniqueClientID(prefix string) string
- type EmitterOptions
- type ReceiverOptions
- type SubscriptionOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ManualAckOption ¶
ManualAckOption returns option which set subscription on manual ack with ack wait value.
func NewEmitter ¶
func NewEmitter(o EmitterOptions) (hevent.Emitter, error)
NewEmitter returns new emitter with tha nats-streaming driver.
func NewReceiver ¶
func NewReceiver(o ReceiverOptions) (hevent.Receiver, error)
NewReceiver returns new instance of the Receiver using nats-streaming driver.
func NewSubscriptionOptions ¶
func NewSubscriptionOptions(o SubscriptionOptions) *hevent.SubscriptionOptions
func UniqueClientID ¶
UniqueClientID generates a new client id formatted by this pattern: {prefix}-{data}-{rand} e.g., accounting-ms-2020101318281-hn1ig8
Types ¶
type EmitterOptions ¶
type EmitterOptions struct { NatsCon *nats.Conn StreamingCon stan.Conn ContextPropagator hexa.ContextPropagator Encoder hevent.Encoder }
func (EmitterOptions) Validate ¶
func (o EmitterOptions) Validate() error
type ReceiverOptions ¶
type ReceiverOptions struct { NatsCon *nats.Conn StreamingCon stan.Conn ContextPropagator hexa.ContextPropagator }
func (ReceiverOptions) Validate ¶
func (o ReceiverOptions) Validate() error
type SubscriptionOptions ¶
type SubscriptionOptions struct { Subject string Group string // provide it if you want to subscribe using queue group. Durable string // provide it if you want durable subscription Position Position stan.SubscriptionOption Opts []stan.SubscriptionOption Handler hevent.EventHandler }
Click to show internal directories.
Click to hide internal directories.