From 16f43836594f2400e52d21da61b6dd32feca9b7d Mon Sep 17 00:00:00 2001 From: uvok cheetah Date: Fri, 8 Dec 2023 17:10:14 +0000 Subject: Move NATS server URL into struct --- nats/notify.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'nats') diff --git a/nats/notify.go b/nats/notify.go index 56cbc7f..d75928d 100644 --- a/nats/notify.go +++ b/nats/notify.go @@ -6,10 +6,11 @@ import ( ) type NatsNotifier struct { + ServerUrl string } func (notif *NatsNotifier) NotifyNewRegistration(reg *registration.Registration) error { - conn, err := nats.Connect("nats://nats-server:4222") + conn, err := nats.Connect(notif.ServerUrl) if err != nil { return err } -- cgit v1.2.3