Documentation ¶
Overview ¶
Package test can be used to create NATS servers used in exporter and collector tests.
Index ¶
- Constants
- func AccstatzTestResponse() string
- func CreateClientConnSubscribeAndPublish(t *testing.T) *nats.Conn
- func GatewayzTestResponse() string
- func RunAccstatzStaticServer(wg *sync.WaitGroup) *http.Server
- func RunGatewayzStaticServer(wg *sync.WaitGroup) *http.Server
- func RunJetStreamServerWithPorts(port, monitorPort int, domain string) *server.Server
- func RunLeafzStaticServer(wg *sync.WaitGroup) *http.Server
- func RunServer() *server.Server
- func RunServerWithName(name string) *server.Server
- func RunServerWithPorts(cport, mport int) *server.Server
- func RunServerWithPortsAndName(cport, mport int, serverName string) *server.Server
- func RunStreamingServer() *nss.StanServer
- func RunStreamingServerWithPorts(clusterID string, port, monitorPort int) *nss.StanServer
- func RunTestReplicator(monitorPort, natsServerPort1, natsServerPort2 int) (*rcore.NATSReplicator, error)
Constants ¶
const ClientPort = 11224
ClientPort is the default port for clients to connect
const MonitorPort = 11424
MonitorPort is the default monitor port
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 ¶
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
RunAccstatzStaticServer starts an http server with static content
func RunGatewayzStaticServer ¶ added in v0.8.0
RunGatewayzStaticServer starts an http server with static content
func RunJetStreamServerWithPorts ¶ added in v0.8.0
RunJetStreamServerWithPorts starts a JetStream server.
func RunLeafzStaticServer ¶ added in v0.9.0
RunLeafzStaticServer runs a leafz static server.
func RunServerWithName ¶ added in v0.11.0
RunServerWithName runs the NATS server in a go routine
func RunServerWithPorts ¶
RunServerWithPorts runs the NATS server with a monitor port in a go routine
func RunServerWithPortsAndName ¶ added in v0.11.0
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.