testutil

package module
v0.0.0-...-b9224dd Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	NatsServer *natsd.Server
}

func StartBroker

func StartBroker() (b *Broker, err error)

StartBroker creates a new NATS broker listening on a random unused port

func (*Broker) ClientURL

func (b *Broker) ClientURL() string

ClientURL provides access the url to access the broker

func (*Broker) Start

func (b *Broker) Start() (err error)

func (*Broker) Stop

func (b *Broker) Stop()

Stop shuts down the broker

type ChoriaNetwork

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

func StartChoriaNetwork

func StartChoriaNetwork(cfg *config.Config) (n *ChoriaNetwork, err error)

StartChoriaNetwork starts a broker anc instance server connect to the broker

func StartTestChoriaNetwork

func StartTestChoriaNetwork(cfg *config.Config, t *testing.T) (n *ChoriaNetwork)

StartTestChoriaNetwork starts a broker and instance server connected to the broker

func (*ChoriaNetwork) ClientURL

func (cn *ChoriaNetwork) ClientURL() string

func (*ChoriaNetwork) ServerInstance

func (cn *ChoriaNetwork) ServerInstance() *server.Instance

func (*ChoriaNetwork) Start

func (cn *ChoriaNetwork) Start() (err error)

func (*ChoriaNetwork) Stop

func (cn *ChoriaNetwork) Stop()

type ChoriaServer

type ChoriaServer struct {
	Instance *server.Instance
	// contains filtered or unexported fields
}

func StartChoriaServer

func StartChoriaServer(b *Broker, cfg *config.Config) (c *ChoriaServer, err error)

StartChoriaServer starts an instance of instance server

func (*ChoriaServer) Start

func (c *ChoriaServer) Start() (err error)

func (*ChoriaServer) Stop

func (c *ChoriaServer) Stop()

Jump to

Keyboard shortcuts

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