move autolistener into util (#780)

This commit is contained in:
Michael Quigley 2024-11-07 12:57:11 -05:00
parent a0b7416695
commit e7331e89f5
No known key found for this signature in database
GPG Key ID: 9B60314A9DD20A62
2 changed files with 3 additions and 2 deletions

View File

@ -8,6 +8,7 @@ import (
"github.com/openziti/zrok/agent/proctree"
"github.com/openziti/zrok/environment/env_core"
"github.com/openziti/zrok/sdk/golang/sdk"
"github.com/openziti/zrok/util"
"github.com/pkg/errors"
"github.com/sirupsen/logrus"
"google.golang.org/grpc"
@ -110,7 +111,7 @@ func (a *Agent) gateway(cfg *AgentConfig) {
logrus.Fatalf("unable to register gateway: %v", err)
}
listener, err := AutoListener(cfg.ConsoleAddress, cfg.ConsoleStartPort, cfg.ConsoleEndPort)
listener, err := util.AutoListener(cfg.ConsoleAddress, cfg.ConsoleStartPort, cfg.ConsoleEndPort)
if err != nil {
logrus.Fatalf("unable to create a listener: %v", err)
}

View File

@ -1,4 +1,4 @@
package agent
package util
import (
"fmt"