From e7331e89f559f329242b3d8ed1048e182865ba5f Mon Sep 17 00:00:00 2001 From: Michael Quigley Date: Thu, 7 Nov 2024 12:57:11 -0500 Subject: [PATCH] move autolistener into util (#780) --- agent/agent.go | 3 ++- {agent => util}/autoListener.go | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) rename {agent => util}/autoListener.go (95%) diff --git a/agent/agent.go b/agent/agent.go index 1fe25c5f..709cbc26 100644 --- a/agent/agent.go +++ b/agent/agent.go @@ -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) } diff --git a/agent/autoListener.go b/util/autoListener.go similarity index 95% rename from agent/autoListener.go rename to util/autoListener.go index fb0f3bfe..48e2fffc 100644 --- a/agent/autoListener.go +++ b/util/autoListener.go @@ -1,4 +1,4 @@ -package agent +package util import ( "fmt"