MCPcopy Create free account
hub / github.com/CyCoreSystems/ari-proxy / natsConnect

Function natsConnect

internal/integration/clientserver.go:16–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

14)
15
16func natsConnect() (*nats.EncodedConn, error) {
17 c, err := nats.Connect(nats.DefaultURL)
18 if err != nil {
19 return nil, eris.Wrap(err, "failed to connect to NATS")
20 }
21 nc, err := nats.NewEncodedConn(c, nats.JSON_ENCODER)
22 if err != nil {
23 return nil, eris.Wrap(err, "failed to encode NATS connection")
24 }
25 return nc, err
26}
27
28// Server represents a generalized ari-proxy server
29type Server interface {

Callers 1

runTestFunction · 0.85

Calls 1

ConnectMethod · 0.65

Tested by

no test coverage detected