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

Function makeSilentHandler

rest/handler.go:146–150  ·  view source on GitHub ↗

makeSilentHandler creates an http.Handler that will run a handler with the given method only logging at debug

(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod)

Source from the content-addressed store, hash-verified

144
145// makeSilentHandler creates an http.Handler that will run a handler with the given method only logging at debug
146func makeSilentHandler(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod) http.Handler {
147 return makeHandlerWithOptions(server, privs, accessPermissions, responsePermissions, method, handlerOptions{
148 httpLogLevel: base.Ptr(silentRequestLogLevel),
149 })
150}
151
152// Creates an http.Handler that will run a handler with the given method even if the target DB is offline
153func makeOfflineHandler(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod) http.Handler {

Callers 2

addSharedRouterHandlersFunction · 0.85
CreateMetricRouterFunction · 0.85

Calls 2

PtrFunction · 0.92
makeHandlerWithOptionsFunction · 0.85

Tested by

no test coverage detected