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

Function completeRequest

limits.go:82–96  ·  view source on GitHub ↗

Post-processing after a response is shipped for a request

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

Source from the content-addressed store, hash-verified

80
81// Post-processing after a response is shipped for a request
82func completeRequest(username, path string, req *http.Request, egress int64) {
83 if limiter == nil || !limiter.isActive() {
84 // rateLimiter not active
85 return
86 }
87
88 // evaluate request completion at endpoints ..
89 // index creation/update/deletion: /api/index/{indexName}
90 // search request: /api/index/{indexName}/query
91 if path != indexPath && path != queryPath {
92 return
93 }
94
95 limiter.completeRequest(username, path, req, egress)
96}
97
98// -----------------------------------------------------------------------------
99

Callers 1

ServeHTTPMethod · 0.85

Calls 2

isActiveMethod · 0.80
completeRequestMethod · 0.80

Tested by

no test coverage detected