Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsLoopback ¶
IsLoopback returns whether addr identifies a loopback source.
Types ¶
type Admission ¶
type Admission struct {
// contains filtered or unexported fields
}
Admission tracks incomplete handshakes by normalized source prefix and bounds the CPU-intensive portion of v2 responder handshakes.
func (*Admission) AcquireSource ¶
AcquireSource reserves one incomplete-handshake slot for addr. The returned release function is safe to call more than once. Source limits are bypassed when bypassSourceLimits is set, while the global connection limit remains active at the listener boundary.
type V2Admission ¶
type V2Admission struct {
// contains filtered or unexported fields
}
V2Admission binds the server-wide v2 admission policy to a single remote address. Its first successful acquisition consumes the handshake's rate budgets. Each acquisition reserves a fresh concurrency slot for one CPU-bound responder phase.
func (*V2Admission) Acquire ¶
func (a *V2Admission) Acquire() (func(), error)
Acquire reserves one v2 concurrency slot for the bound remote. The first successful call also consumes the global and per-source rate budgets.