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

Function NewEConn

test/netchan_test.go:26–32  ·  view source on GitHub ↗

lint:file-ignore SA1019 Ignore deprecation warnings for EncodedConn NewEConn

(t tLogger)

Source from the content-addressed store, hash-verified

24
25// NewEConn
26func NewEConn(t tLogger) *nats.EncodedConn {
27 ec, err := nats.NewEncodedConn(NewDefaultConnection(t), nats.DEFAULT_ENCODER)
28 if err != nil {
29 t.Fatalf("Failed to create an encoded connection: %v\n", err)
30 }
31 return ec
32}
33
34func TestBadChan(t *testing.T) {
35 s := RunDefaultServer()

Callers 10

TestBadChanFunction · 0.85
TestSimpleSendChanFunction · 0.85
TestFailedChannelSendFunction · 0.85
TestSimpleRecvChanFunction · 0.85
TestQueueRecvChanFunction · 0.85
TestDecoderErrRecvChanFunction · 0.85

Calls 2

FatalfMethod · 0.80
NewDefaultConnectionFunction · 0.70

Tested by

no test coverage detected