MCPcopy
hub / github.com/caddyserver/caddy / incInFlightRequest

Function incInFlightRequest

modules/caddyhttp/reverseproxy/reverseproxy.go:53–56  ·  view source on GitHub ↗
(address string)

Source from the content-addressed store, hash-verified

51var inFlightRequests sync.Map
52
53func incInFlightRequest(address string) {
54 v, _ := inFlightRequests.LoadOrStore(address, new(atomic.Int64))
55 v.(*atomic.Int64).Add(1)
56}
57
58func decInFlightRequest(address string) {
59 if v, ok := inFlightRequests.Load(address); ok {

Callers 1

reverseProxyMethod · 0.85

Calls 2

LoadOrStoreMethod · 0.80
AddMethod · 0.45

Tested by

no test coverage detected