nats

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2020 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewError

func NewError(format string, a ...interface{}) error

NewError is return a new error with

func NewLogger

func NewLogger() *natsLogger

NewLogger returns a new logger for Nats.

func Timeout

func Timeout(t time.Duration) func(o *Opts)

Timeout ...

Types

type Nats

type Nats interface {
	// ClusterID ...
	ClusterID() string
	// Addr ...
	Addr() net.Addr
	// MonitorAddr ...
	MonitorAddr() *net.TCPAddr
	// Ready ...
	Ready() <-chan struct{}

	s.Listener
}

Nats ...

func New

func New(cfg *config.Config, opts ...Opt) Nats

New returns a new server

type Opt

type Opt func(*Opts)

Opt ...

type Opts

type Opts struct {
	Timeout time.Duration
}

Opts ...

Jump to

Keyboard shortcuts

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