Skip to content

Commit

Permalink
ref: change name for router manager
Browse files Browse the repository at this point in the history
  • Loading branch information
kenriortega committed Nov 6, 2021
1 parent a9fb610 commit 5ff5c50
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions cmd/cli/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ func StartMngt(config config.Config) {
}
}
// Routes...
adminRoutes := r.PathPrefix("/api/v1/mngt").Subrouter()
adminRoutes.HandleFunc("/", mh.GetAllEndpoints).Methods(http.MethodGet)
adminRoutes.HandleFunc("/health", healthHandler)
adminRoutes.HandleFunc("/readiness", readinessHandler)
mngt := r.PathPrefix("/api/v1/mngt").Subrouter()
mngt.HandleFunc("/", mh.GetAllEndpoints).Methods(http.MethodGet)
mngt.HandleFunc("/health", healthHandler)
mngt.HandleFunc("/readiness", readinessHandler)

// Realtime options
adminRoutes.HandleFunc("/wss", mh.WssocketHandler)
mngt.HandleFunc("/wss", mh.WssocketHandler)
r.Use(CORSMiddleware)
port := 10_001
server := httpsrv.NewServer(
Expand All @@ -106,7 +106,7 @@ func StartMngt(config config.Config) {
go func() {
t := time.NewTicker(time.Second * 30)
for range t.C {
// logger.LogInfo("Starting health check...")

endpoints, err := service.ListEndpoints()
if err != nil {
logger.LogError(err.Error())
Expand All @@ -124,7 +124,7 @@ func StartMngt(config config.Config) {
}
mh.UpdateEndpoint(it)
}
// logger.LogInfo("Health check completed")

}
}()

Expand Down

0 comments on commit 5ff5c50

Please sign in to comment.