eventbus

package
v0.0.0-...-3d45443 Latest Latest
Warning

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

Go to latest
Published: Oct 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type EventBus

type EventBus struct {
	// contains filtered or unexported fields
}

func NewEventBus

func NewEventBus(a app.App, host string, handler EventBusHandler, options Options) *EventBus

func (*EventBus) Close

func (eb *EventBus) Close()

func (*EventBus) Connect

func (eb *EventBus) Connect() error

func (*EventBus) ConnectToSTAN

func (eb *EventBus) ConnectToSTAN() error

func (*EventBus) GetConnection

func (eb *EventBus) GetConnection() *nats.Conn

func (*EventBus) GetSTANConnection

func (eb *EventBus) GetSTANConnection() stan.Conn

func (*EventBus) ReconnectHandler

func (eb *EventBus) ReconnectHandler(natsConn *nats.Conn)

type EventBusHandler

type EventBusHandler struct {
	Reconnect  func(natsConn *nats.Conn)
	Disconnect func(natsConn *nats.Conn)
}

type Options

type Options struct {
	ClusterID           string
	ClientName          string
	PingInterval        time.Duration
	MaxPingsOutstanding int
	MaxReconnects       int
}

Jump to

Keyboard shortcuts

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