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

Function client

test/kv_test.go:1197–1204  ·  view source on GitHub ↗

Helpers

(t *testing.T, s *server.Server, opts ...nats.Option)

Source from the content-addressed store, hash-verified

1195// Helpers
1196
1197func client(t *testing.T, s *server.Server, opts ...nats.Option) *nats.Conn {
1198 t.Helper()
1199 nc, err := nats.Connect(s.ClientURL(), opts...)
1200 if err != nil {
1201 t.Fatalf("Unexpected error: %v", err)
1202 }
1203 return nc
1204}
1205
1206func jsClient(t *testing.T, s *server.Server, opts ...nats.Option) (*nats.Conn, nats.JetStreamContext) {
1207 t.Helper()

Callers 1

jsClientFunction · 0.70

Calls 2

ConnectMethod · 0.80
FatalfMethod · 0.80

Tested by

no test coverage detected