Documentation ¶
Index ¶
- func EventBus(eventCfg cqrs.EventConfig, options ...EventBusOption) (cqrs.EventBus, error)
- func EventBusWithConnection(sc stan.Conn, eventCfg cqrs.EventConfig, options ...EventBusOption) cqrs.EventBus
- func EventBusWithNATSConnection(nc *nats.Conn, eventCfg cqrs.EventConfig, options ...EventBusOption) (cqrs.EventBus, error)
- func WithEventBusFactory(options ...EventBusOption) setup.Option
- func WithEventBusFactoryWithConnection(sc stan.Conn, options ...EventBusOption) setup.Option
- func WithEventBusFactoryWithNATSConnection(nc *nats.Conn, options ...EventBusOption) setup.Option
- type Config
- type EventBusOption
- func BufferSize(size int) EventBusOption
- func ClientID(id string) EventBusOption
- func ClusterID(id string) EventBusOption
- func ConnectOptions(options ...stan.Option) EventBusOption
- func DurableName(name string) EventBusOption
- func Logger(logger *log.Logger) EventBusOption
- func QueueGroup(group string) EventBusOption
- func SubjectPrefix(prefix string) EventBusOption
- func SubscriptionOptions(options ...stan.SubscriptionOption) EventBusOption
- func URL(url string) EventBusOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EventBus ¶ added in v0.11.0
func EventBus(eventCfg cqrs.EventConfig, options ...EventBusOption) (cqrs.EventBus, error)
EventBus ...
func EventBusWithConnection ¶ added in v0.11.0
func EventBusWithConnection(sc stan.Conn, eventCfg cqrs.EventConfig, options ...EventBusOption) cqrs.EventBus
EventBusWithConnection returns a new NATS streaming event bus.
func EventBusWithNATSConnection ¶ added in v0.11.0
func EventBusWithNATSConnection(nc *nats.Conn, eventCfg cqrs.EventConfig, options ...EventBusOption) (cqrs.EventBus, error)
EventBusWithNATSConnection returns a NATS streaming events bus.
func WithEventBusFactory ¶
func WithEventBusFactory(options ...EventBusOption) setup.Option
WithEventBusFactory ...
func WithEventBusFactoryWithConnection ¶
func WithEventBusFactoryWithConnection(sc stan.Conn, options ...EventBusOption) setup.Option
WithEventBusFactoryWithConnection ...
func WithEventBusFactoryWithNATSConnection ¶
func WithEventBusFactoryWithNATSConnection(nc *nats.Conn, options ...EventBusOption) setup.Option
WithEventBusFactoryWithNATSConnection ...
Types ¶
type Config ¶
type Config struct { ClusterID string ClientID string DurableName string URL string SubjectPrefix string BufferSize int QueueGroup string ConnectOptions []stan.Option SubscriptionOptions []stan.SubscriptionOption Logger *log.Logger }
Config is the events bus config.
type EventBusOption ¶
type EventBusOption func(*Config)
EventBusOption ...
func SubscriptionOptions ¶
func SubscriptionOptions(options ...stan.SubscriptionOption) EventBusOption
SubscriptionOptions ...
Click to show internal directories.
Click to hide internal directories.