test

package
v0.15.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package test can be used to create NATS servers used in exporter and collector tests.

Index

Constants

View Source
const ClientPort = 11224

ClientPort is the default port for clients to connect

View Source
const MonitorPort = 11424

MonitorPort is the default monitor port

View Source
const StaticPort = 11425

StaticPort is where static nats metrics are served

Variables

This section is empty.

Functions

func AccstatzTestResponse added in v0.13.0

func AccstatzTestResponse() string

AccstatzTestResponse is static data for tests

func CreateClientConnSubscribeAndPublish

func CreateClientConnSubscribeAndPublish(t *testing.T) *nats.Conn

CreateClientConnSubscribeAndPublish creates a conn and publishes

func GatewayzTestResponse added in v0.8.0

func GatewayzTestResponse() string

GatewayzTestResponse is static data for tests

func RunAccstatzStaticServer added in v0.13.0

func RunAccstatzStaticServer(wg *sync.WaitGroup) *http.Server

RunAccstatzStaticServer starts an http server with static content

func RunGatewayzStaticServer added in v0.8.0

func RunGatewayzStaticServer(wg *sync.WaitGroup) *http.Server

RunGatewayzStaticServer starts an http server with static content

func RunJetStreamServerWithPorts added in v0.8.0

func RunJetStreamServerWithPorts(port, monitorPort int, domain string) *server.Server

RunJetStreamServerWithPorts starts a JetStream server.

func RunLeafzStaticServer added in v0.9.0

func RunLeafzStaticServer(wg *sync.WaitGroup) *http.Server

RunLeafzStaticServer runs a leafz static server.

func RunServer

func RunServer() *server.Server

RunServer runs the NATS server in a go routine

func RunServerWithName added in v0.11.0

func RunServerWithName(name string) *server.Server

RunServerWithName runs the NATS server in a go routine

func RunServerWithPorts

func RunServerWithPorts(cport, mport int) *server.Server

RunServerWithPorts runs the NATS server with a monitor port in a go routine

func RunServerWithPortsAndName added in v0.11.0

func RunServerWithPortsAndName(cport, mport int, serverName string) *server.Server

RunServerWithPortsAndName runs the NATS server with a monitor port and a name in a go routine

func RunStreamingServer added in v0.2.0

func RunStreamingServer() *nss.StanServer

RunStreamingServer runs the STAN server in a go routine.

func RunStreamingServerWithPorts added in v0.6.0

func RunStreamingServerWithPorts(clusterID string, port, monitorPort int) *nss.StanServer

RunStreamingServerWithPorts runs the STAN server in a go routine allowing the clusterID and ports to be specified..

func RunTestReplicator added in v0.6.0

func RunTestReplicator(monitorPort, natsServerPort1, natsServerPort2 int) (*rcore.NATSReplicator, error)

RunTestReplicator starts an instance of the replicator

Types

This section is empty.

Jump to

Keyboard shortcuts

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