package test

import "github.com/nats-io/nats.go/test"

Index

Functions

func NewConnection

func NewConnection(t tLogger, port int) *nats.Conn

NewConnection forms connection on a given port.

func NewDefaultConnection

func NewDefaultConnection(t tLogger) *nats.Conn

NewDefaultConnection

func NewEConn

func NewEConn(t tLogger) *nats.EncodedConn

NewEConn

func RunDefaultServer

func RunDefaultServer() *server.Server

RunDefaultServer will run a server on the default port.

func RunServerOnPort

func RunServerOnPort(port int) *server.Server

RunServerOnPort will run a server on the given port.

func RunServerWithConfig

func RunServerWithConfig(configFile string) (*server.Server, *server.Options)

RunServerWithConfig will run a server with the given configuration file.

func RunServerWithOptions

func RunServerWithOptions(opts server.Options) *server.Server

RunServerWithOptions will run a server with the given options.

func Wait

func Wait(ch chan bool) error

Dumb wait program to sync on callbacks, etc... Will timeout

func WaitTime

func WaitTime(ch chan bool, timeout time.Duration) error

Wait for a chan with a timeout.

Types

type TestLogger

type TestLogger tLogger

TestLogger

Source Files

test.go

Version
v1.3.0
Published
Aug 8, 2017
Platform
darwin/amd64
Imports
6 packages
Last checked
16 minutes ago

Tools for package owners.