stan

package
v0.13.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 2, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

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 BufferSize

func BufferSize(size int) EventBusOption

BufferSize ...

func ClientID

func ClientID(id string) EventBusOption

ClientID ...

func ClusterID

func ClusterID(id string) EventBusOption

ClusterID ...

func ConnectOptions

func ConnectOptions(options ...stan.Option) EventBusOption

ConnectOptions ...

func DurableName

func DurableName(name string) EventBusOption

DurableName ...

func Logger

func Logger(logger *log.Logger) EventBusOption

Logger ...

func QueueGroup

func QueueGroup(group string) EventBusOption

QueueGroup ...

func SubjectPrefix

func SubjectPrefix(prefix string) EventBusOption

SubjectPrefix ...

func SubscriptionOptions

func SubscriptionOptions(options ...stan.SubscriptionOption) EventBusOption

SubscriptionOptions ...

func URL

func URL(url string) EventBusOption

URL ...

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL