metric exception

This commit is contained in:
2023-11-23 20:08:57 +09:00
parent 8adef2adb8
commit d672b5dd90
2 changed files with 3 additions and 0 deletions

View File

@ -155,6 +155,7 @@ func newMetricImpl(mt MetricType, name string, help string, constLabels map[stri
})
writer = &metric_int64{
valptr: new(int64),
key: key,
writerChan: mc.writerChan,
}

View File

@ -117,6 +117,7 @@ func NewHTTPServerWithPort(serveMux *http.ServeMux, port int) *Server {
addr := fmt.Sprintf(":%d", port)
serveMux.HandleFunc(MakeHttpHandlerPattern("welcome"), welcomeHandler)
serveMux.HandleFunc(MakeHttpHandlerPattern("lb_health_chceck"), healthCheckHandler)
serveMux.HandleFunc(MakeHttpHandlerPattern("lb_health_check"), healthCheckHandler)
server := &Server{
httpserver: &http.Server{Addr: addr, Handler: serveMux},
@ -127,6 +128,7 @@ func NewHTTPServerWithPort(serveMux *http.ServeMux, port int) *Server {
}
func NewHTTPServer(serveMux *http.ServeMux) *Server {
// 시작시 자동으로 enable됨
if len(*tls) > 0 && *portptr == 80 {
*portptr = 443