nats

package
v0.0.0-...-183bc8b Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const NATSPort = "4222"

NATSPort for the NATS server

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker interface {
	Subscribe(types.Controller, []string) error
}

Broker used to subscribe to NATS subjects

func NewBroker

func NewBroker(config BrokerConfig) (Broker, error)

NewBroker loops until we are able to connect to the NATS server

type BrokerConfig

type BrokerConfig struct {

	// Host is the NATS address, the port is hard-coded to 4222
	Host string

	// ConnTimeout is the timeout for Dial on a connection.
	ConnTimeout time.Duration
}

BrokerConfig high level config for the broker

Jump to

Keyboard shortcuts

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