From 054c1e55c429247136e9232eba87280e37dbbd08 Mon Sep 17 00:00:00 2001 From: ohdearaugustin Date: Sat, 16 May 2020 01:16:04 +0200 Subject: [PATCH] remove port option Signed-off-by: ohdearaugustin --- cmd/query/app/flags.go | 2 -- cmd/query/app/server.go | 2 +- cmd/query/app/server_test.go | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/cmd/query/app/flags.go b/cmd/query/app/flags.go index 45774feac90..b34a1b70306 100644 --- a/cmd/query/app/flags.go +++ b/cmd/query/app/flags.go @@ -51,8 +51,6 @@ const ( type QueryOptions struct { // HostPort is the host:port address that the query service listens o n HostPort string - // Port is the port that the query service listens in on (deprecated, will be removed after 2020-06-30 or in release v1.20.0, whichever is later) - Port int // BasePath is the prefix for all UI and API HTTP routes BasePath string // StaticAssets is the path for the static assets for the UI (https://github.com/uber/jaeger-ui) diff --git a/cmd/query/app/server.go b/cmd/query/app/server.go index e1984ab17c9..4ce161aca87 100644 --- a/cmd/query/app/server.go +++ b/cmd/query/app/server.go @@ -100,7 +100,7 @@ func (s *Server) Start() error { } s.conn = conn - tcpPort := s.queryOptions.Port + var tcpPort int if port, err := netutils.GetPort(s.conn.Addr()); err == nil { tcpPort = port } diff --git a/cmd/query/app/server_test.go b/cmd/query/app/server_test.go index 30f4a8c32a3..7c85c417299 100644 --- a/cmd/query/app/server_test.go +++ b/cmd/query/app/server_test.go @@ -90,7 +90,7 @@ func TestServerGracefulExit(t *testing.T) { querySvc := &querysvc.QueryService{} tracer := opentracing.NoopTracer{} - server := NewServer(flagsSvc, querySvc, &QueryOptions{Port: ports.QueryAdminHTTP}, tracer) + server := NewServer(flagsSvc, querySvc, &QueryOptions{HostPort: ports.PortToHostPort(ports.QueryAdminHTTP)}, tracer) assert.NoError(t, server.Start()) // Wait for servers to come up before we can call .Close()