MCPcopy Create free account
hub / github.com/couchbase/cbft / processRequest

Function processRequest

limits.go:65–79  ·  view source on GitHub ↗

----------------------------------------------------------------------------- Pre-processing for a request

(username, path string, req *http.Request)

Source from the content-addressed store, hash-verified

63
64// Pre-processing for a request
65func processRequest(username, path string, req *http.Request) (bool, string) {
66 if limiter == nil || !limiter.isActive() {
67 // rateLimiter not active
68 return true, ""
69 }
70
71 // evaluate requests at endpoints ..
72 // index creation/update/deletion: /api/index/{indexName}
73 // search request: /api/index/{indexName}/query
74 if path != indexPath && path != queryPath {
75 return true, ""
76 }
77
78 return limiter.processRequest(username, path, req)
79}
80
81// Post-processing after a response is shipped for a request
82func completeRequest(username, path string, req *http.Request, egress int64) {

Callers 1

checkAPIAuthFunction · 0.85

Calls 2

isActiveMethod · 0.80
processRequestMethod · 0.80

Tested by

no test coverage detected