Nexus/pkg/internal/mq/nats.go

17 lines
203 B
Go
Raw Permalink Normal View History

2024-10-24 15:46:09 +00:00
package mq
import "github.com/nats-io/nats.go"
var Kmq *nats.Conn
func ConnectNats(in string) error {
nc, err := nats.Connect(in)
if err != nil {
return err
} else {
Kmq = nc
}
return nil
}