From e0787ed8a836625ba54c0bab3a1e18407f7c8a7f Mon Sep 17 00:00:00 2001 From: Antonio Navarro Perez Date: Thu, 11 Feb 2021 16:37:41 +0100 Subject: [PATCH] Requested changes. Signed-off-by: Antonio Navarro Perez --- http/handler.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/http/handler.go b/http/handler.go index 63682a992..77864ae74 100644 --- a/http/handler.go +++ b/http/handler.go @@ -67,7 +67,7 @@ type Handler struct { api *pilosa.API ln net.Listener - // Needed real URL for a log + // url is used to hold the advertise bind address for printing a log during startup. url string closeTimeout time.Duration @@ -137,6 +137,9 @@ func OptHandlerLogger(logger logger.Logger) handlerOption { } } +// OptHandlerListener set the listener that will be used by the HTTP server. +// Url must be the advertised URL. It will be used to show a log to the user +// about where the Web UI is. This option is mandatory. func OptHandlerListener(ln net.Listener, url string) handlerOption { return func(h *Handler) error { h.ln = ln