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

Function makeOfflineHandler

rest/handler.go:153–157  ·  view source on GitHub ↗

Creates an http.Handler that will run a handler with the given method even if the target DB is offline

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

Source from the content-addressed store, hash-verified

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 {
154 return makeHandlerWithOptions(server, privs, accessPermissions, responsePermissions, method, handlerOptions{
155 runOffline: true,
156 })
157}
158
159// makeMetadataDBOfflineHandler creates an http.Handler that will run a handler with the given method even if the target DB couldn't be instantiated
160func makeMetadataDBOfflineHandler(server *ServerContext, privs handlerPrivs, accessPermissions []Permission, responsePermissions []Permission, method handlerMethod) http.Handler {

Callers 2

createCommonRouterFunction · 0.85
CreateAdminRouterFunction · 0.85

Calls 1

makeHandlerWithOptionsFunction · 0.85

Tested by

no test coverage detected