MCPcopy Create free account
hub / github.com/couchbase/sync_gateway / CreateMetricRouter

Function CreateMetricRouter

rest/routing.go:396–404  ·  view source on GitHub ↗
(sc *ServerContext)

Source from the content-addressed store, hash-verified

394}
395
396func CreateMetricRouter(sc *ServerContext) *mux.Router {
397 r := NewRouter(sc, metricsServer)
398
399 r.Handle("/metrics", makeSilentHandler(sc, metricsPrivs, []Permission{PermStatsExport}, nil, (*handler).handleMetrics)).Methods("GET")
400 r.Handle("/_metrics", makeSilentHandler(sc, metricsPrivs, []Permission{PermStatsExport}, nil, (*handler).handleMetrics)).Methods("GET")
401 r.Handle(kDebugURLPathPrefix, makeSilentHandler(sc, metricsPrivs, []Permission{PermStatsExport}, nil, (*handler).handleExpvar)).Methods("GET")
402
403 return r
404}
405
406func createDiagnosticRouter(sc *ServerContext) *mux.Router {
407 r := NewRouter(sc, diagnosticServer)

Callers 1

CreateMetricHandlerFunction · 0.85

Calls 2

NewRouterFunction · 0.85
makeSilentHandlerFunction · 0.85

Tested by

no test coverage detected