Use argument instead of default value for nats connection

This commit is contained in:
Christoph Kluge 2021-11-12 13:41:30 +01:00
parent 1c12c655f1
commit eff61ce93e

View File

@ -55,7 +55,7 @@ type Metric struct {
// function. handleLine will be called for each line recieved via nats.
// Send `true` through the done channel for gracefull termination.
func ReceiveNats(address string, handleLine func(dec *lineprotocol.Decoder) error, workers int, ctx context.Context) error {
nc, err := nats.Connect(nats.DefaultURL)
nc, err := nats.Connect(address)
if err != nil {
return err
}