core

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 19, 2021 License: MIT Imports: 2 Imported by: 23

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewClient

func NewClient() *Client

func (*Client) Connect

func (client *Client) Connect(host string, options *Options) error

func (*Client) Disconnect

func (client *Client) Disconnect()

func (*Client) GetConnection

func (client *Client) GetConnection() *nats.Conn

type EventBus

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

func NewEventBus

func NewEventBus(host string, handler EventBusHandler, options EventBusOptions) *EventBus

func (*EventBus) Close

func (eb *EventBus) Close()

func (*EventBus) Connect

func (eb *EventBus) Connect() error

func (*EventBus) GetConnection

func (eb *EventBus) GetConnection() *nats.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 EventBusOptions

type EventBusOptions struct {
	PingInterval        time.Duration
	MaxPingsOutstanding int
	MaxReconnects       int
}

type Options

type Options struct {
	PingInterval        time.Duration
	MaxPingsOutstanding int
	MaxReconnects       int
	ReconnectHandler    func()
	DisconnectHandler   func()
}

func NewOptions

func NewOptions() *Options

Jump to

Keyboard shortcuts

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