func NewJsonEncodedConn(tl test.TestLogger) *nats.EncodedConn { ec, err := nats.NewEncodedConn(test.NewDefaultConnection(tl), nats.JSON_ENCODER) if err != nil { tl.Fatalf("Failed to create an encoded connection: %v\n", err) } return ec }
func NewProtoEncodedConn(tl test.TestLogger) *nats.EncodedConn { ec, err := nats.NewEncodedConn(test.NewConnection(tl, TEST_PORT), protobuf.PROTOBUF_ENCODER) if err != nil { tl.Fatalf("Failed to create an encoded connection: %v\n", err) } return ec }