MCPcopy
hub / github.com/cloudflare/cloudflared / Acquire

Method Acquire

flow/limiter.go:19–19  ·  view source on GitHub ↗

Acquire tries to acquire a free slot for a flow, if the value of flows is already above the maximum it returns ErrTooManyActiveFlows.

(flowType string)

Source from the content-addressed store, hash-verified

17 // Acquire tries to acquire a free slot for a flow, if the value of flows is already above
18 // the maximum it returns ErrTooManyActiveFlows.
19 Acquire(flowType string) error
20 // Release releases a slot for a flow.
21 Release()
22 // SetLimit allows to hot swap the limit value of the limiter.

Callers 10

TestFlowLimiter_LimitedFunction · 0.95
TestFlowLimiter_SetLimitFunction · 0.95
RegisterUdpSessionMethod · 0.65
RegisterSessionMethod · 0.65
ProxyTCPMethod · 0.65
TestConnectionsFunction · 0.65

Implementers 3

flowLimiterflow/limiter.go
MockLimitermocks/mock_limiter.go
MockLimiterMockRecordermocks/mock_limiter.go

Calls

no outgoing calls