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

Function NewProtoEncodedConn

test/protobuf_test.go:30–36  ·  view source on GitHub ↗

lint:file-ignore SA1019 Ignore deprecation warnings for EncodedConn

(tl TestLogger)

Source from the content-addressed store, hash-verified

28//lint:file-ignore SA1019 Ignore deprecation warnings for EncodedConn
29
30func NewProtoEncodedConn(tl TestLogger) *nats.EncodedConn {
31 ec, err := nats.NewEncodedConn(NewConnection(tl, TEST_PORT), protobuf.PROTOBUF_ENCODER)
32 if err != nil {
33 tl.Fatalf("Failed to create an encoded connection: %v\n", err)
34 }
35 return ec
36}
37
38func TestEncProtoMarshalStruct(t *testing.T) {
39 s := RunServerOnPort(TEST_PORT)

Callers 3

TestEncProtoNilRequestFunction · 0.85

Calls 2

FatalfMethod · 0.80
NewConnectionFunction · 0.70

Tested by

no test coverage detected