Example #1
0
// HandleSubrouter uses the subrouter for a specific calls and creates a tree of sorts
// handling each route with a different subrouter
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {

	s.Path("/{endpoint_name}/{metric_name}").
		Methods("GET").
		Name("Metric Result").
		Handler(confhandler.Respond(GetMetricResult))

}
Example #2
0
// HandleSubrouter contains the different paths to follow during subrouting
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {

	// eg. timelines/critical/SITE/mysite/service/apache/endpoints/apache01.host/metrics/memory_used
	s.Path("/{report_name}/{group_type}/{group_name}/services/{service_name}/endpoints/{endpoint_name}/metrics/{metric_name}").
		Methods("GET").
		Name("metric name").
		Handler(confhandler.Respond(routeCheckGroup))

	// eg. timelines/critical/SITE/mysite/service/apache/endpoints/apache01.host/metrics
	s.Path("/{report_name}/{group_type}/{group_name}/services/{service_name}/endpoints/{endpoint_name}/metrics").
		Methods("GET").
		Name("all metrics").
		Handler(confhandler.Respond(routeCheckGroup))

}
Example #3
0
// HandleSubrouter contains the different paths to follow during subrouting
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {

	// eg. timelines/critical/SITES/mysite
	s.Path("/{report_name}/{group_type}/{group_name}").
		Methods("GET").
		Name("endpoint group name").
		Handler(confhandler.Respond(routeCheckGroup))

	// eg. timelines/critical/SITES
	s.Path("/{report_name}/{group_type}").
		Methods("GET").
		Name("all endpoint groups").
		Handler(confhandler.Respond(routeCheckGroup))

}
Example #4
0
// HandleSubrouter contains the different paths to follow during subrouting
func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler) {

	// eg. timelines/critical/SITE/mysite/services/apache
	s.Path("/{report_name}/{group_type}/{group_name}/services/{service_name}").
		Methods("GET").
		Name("service name").
		Handler(confhandler.Respond(routeCheckGroup))

	// eg. timelines/critical/SITE/mysite/services
	s.Path("/{report_name}/{group_type}/{group_name}/services").
		Methods("GET").
		Name("all services").
		Handler(confhandler.Respond(routeCheckGroup))

}