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:
parent
7229f33cac
commit
eede523999
2 changed files with 3 additions and 3 deletions
|
@ -20,6 +20,7 @@ COPY --from=build-env /build/cmd/steward/steward /app/
|
||||||
ENV CONFIG_FOLDER "./etc"
|
ENV CONFIG_FOLDER "./etc"
|
||||||
ENV SOCKET_FOLDER "./tmp"
|
ENV SOCKET_FOLDER "./tmp"
|
||||||
ENV TCP_LISTENER ""
|
ENV TCP_LISTENER ""
|
||||||
|
ENV HTTP_LISTENER "localhost:8091"
|
||||||
ENV DATABASE_FOLDER "./var/lib"
|
ENV DATABASE_FOLDER "./var/lib"
|
||||||
ENV NODE_NAME ""
|
ENV NODE_NAME ""
|
||||||
ENV BROKER_ADDRESS "127.0.0.1:4222"
|
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\
|
CMD ["ash","-c","env CONFIGFOLDER=./etc/ /app/steward\
|
||||||
-socketFolder=$SOCKET_FOLDER\
|
-socketFolder=$SOCKET_FOLDER\
|
||||||
-tcpListener=$TCP_LISTENER\
|
-tcpListener=$TCP_LISTENER\
|
||||||
|
-httpListener=$HTTP_LISTENER\
|
||||||
-databaseFolder=$DATABASE_FOLDER\
|
-databaseFolder=$DATABASE_FOLDER\
|
||||||
-nodeName=$NODE_NAME\
|
-nodeName=$NODE_NAME\
|
||||||
-brokerAddress=$BROKER_ADDRESS\
|
-brokerAddress=$BROKER_ADDRESS\
|
||||||
|
|
|
@ -9,8 +9,6 @@ import (
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"github.com/prometheus/client_golang/prometheus/promhttp"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
// readSocket will read the .sock file specified.
|
// readSocket will read the .sock file specified.
|
||||||
|
@ -160,7 +158,7 @@ func (s *server) readHttpListener() {
|
||||||
os.Exit(1)
|
os.Exit(1)
|
||||||
}
|
}
|
||||||
mux := http.NewServeMux()
|
mux := http.NewServeMux()
|
||||||
mux.Handle("/metrics", promhttp.Handler())
|
mux.HandleFunc("/metrics", s.readHTTPlistenerHandler)
|
||||||
|
|
||||||
err = http.Serve(n, mux)
|
err = http.Serve(n, mux)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
Loading…
Reference in a new issue