MCPcopy
hub / github.com/nats-io/nats.go / RunServerOnPort

Function RunServerOnPort

jetstream/test/helper_test.go:95–100  ·  view source on GitHub ↗

RunServerOnPort will run a server on the given port.

(port int)

Source from the content-addressed store, hash-verified

93
94// RunServerOnPort will run a server on the given port.
95func RunServerOnPort(port int) *server.Server {
96 opts := natsserver.DefaultTestOptions
97 opts.Port = port
98 opts.Cluster.Name = "testing"
99 return RunServerWithOptions(opts)
100}
101
102// RunServerWithOptions will run a server with the given options.
103func RunServerWithOptions(opts server.Options) *server.Server {

Callers 1

RunDefaultServerFunction · 0.70

Calls 1

RunServerWithOptionsFunction · 0.70

Tested by

no test coverage detected