Versions in this module Expand all Collapse all v0 v0.1.1 Oct 1, 2022 v0.1.0 Feb 11, 2022 Changes in this version + var ErrReceiveTimeout = errors.New("receive timed out") + type Bus struct + func New(enc codec.Encoding, opts ...Option) *Bus + func (bus *Bus) Connect(ctx context.Context) error + func (bus *Bus) Disconnect(ctx context.Context) error + func (bus *Bus) Publish(ctx context.Context, events ...event.Event) error + func (bus *Bus) Subscribe(ctx context.Context, names ...string) (<-chan event.Event, <-chan error, error) + type Driver interface + func Core(opts ...nats.Option) Driver + func Streaming(clusterID, clientID string, opts ...stan.Option) Driver + type Option func(*Bus) + func Conn(conn *nats.Conn) Option + func Durable() Option + func DurableFunc(fn func(subject, queue string) string) Option + func EatErrors() Option + func QueueGroupByEvent() Option + func QueueGroupByFunc(fn func(eventName string) string) Option + func ReceiveTimeout(d time.Duration) Option + func StreamingConn(conn stan.Conn) Option + func SubjectFunc(fn func(eventName string) string) Option + func SubjectPrefix(prefix string) Option + func URL(url string) Option + func Use(d Driver) Option