aboutsummaryrefslogtreecommitdiff
path: root/setup/jetstream/nats.go
diff options
context:
space:
mode:
Diffstat (limited to 'setup/jetstream/nats.go')
-rw-r--r--setup/jetstream/nats.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/setup/jetstream/nats.go b/setup/jetstream/nats.go
index c6b88e00..09048cc9 100644
--- a/setup/jetstream/nats.go
+++ b/setup/jetstream/nats.go
@@ -103,6 +103,9 @@ func setupNATS(process *process.ProcessContext, cfg *config.JetStream, nc *natsc
InsecureSkipVerify: true,
}))
}
+ if string(cfg.Credentials) != "" {
+ opts = append(opts, natsclient.UserCredentials(string(cfg.Credentials)))
+ }
nc, err = natsclient.Connect(strings.Join(cfg.Addresses, ","), opts...)
if err != nil {
logrus.WithError(err).Panic("Unable to connect to NATS")