1
0
Fork 0
mirror of https://github.com/postmannen/ctrl.git synced 2024-12-14 12:37:31 +00:00

added httpreader handlefunc

This commit is contained in:
postmannen 2021-09-10 05:44:26 +02:00
parent 7229f33cac
commit eede523999
2 changed files with 3 additions and 3 deletions

View file

@ -20,6 +20,7 @@ COPY --from=build-env /build/cmd/steward/steward /app/
ENV CONFIG_FOLDER "./etc"
ENV SOCKET_FOLDER "./tmp"
ENV TCP_LISTENER ""
ENV HTTP_LISTENER "localhost:8091"
ENV DATABASE_FOLDER "./var/lib"
ENV NODE_NAME ""
ENV BROKER_ADDRESS "127.0.0.1:4222"
@ -54,6 +55,7 @@ ENV START_SUB_REQ_N_CLI_COMMAND_CONT ""
CMD ["ash","-c","env CONFIGFOLDER=./etc/ /app/steward\
-socketFolder=$SOCKET_FOLDER\
-tcpListener=$TCP_LISTENER\
-httpListener=$HTTP_LISTENER\
-databaseFolder=$DATABASE_FOLDER\
-nodeName=$NODE_NAME\
-brokerAddress=$BROKER_ADDRESS\

View file

@ -9,8 +9,6 @@ import (
"net"
"net/http"
"os"
"github.com/prometheus/client_golang/prometheus/promhttp"
)
// readSocket will read the .sock file specified.
@ -160,7 +158,7 @@ func (s *server) readHttpListener() {
os.Exit(1)
}
mux := http.NewServeMux()
mux.Handle("/metrics", promhttp.Handler())
mux.HandleFunc("/metrics", s.readHTTPlistenerHandler)
err = http.Serve(n, mux)
if err != nil {