class KeyResolver

Properties

protected int $hashSeed

Methods

__construct(string $prefix, Closure|null $scopeResolver = null)

Create a new physical key resolver.

string
resolve(AdmissionPolicy|Backoff|Cooldown $policy, string|null $limiterName = null)

Resolve a stable fixed-length physical key.

string
policyIdentity(AdmissionPolicy|Backoff|Cooldown $policy)

Build the stable policy portion of an identity.

string
segment(string $domain, string $value)

Encode a domain-tagged length-prefixed identity segment.

Details

at line 19
__construct(string $prefix, Closure|null $scopeResolver = null)

Create a new physical key resolver.

Parameters

string $prefix
Closure|null $scopeResolver

at line 37
string resolve(AdmissionPolicy|Backoff|Cooldown $policy, string|null $limiterName = null)

Resolve a stable fixed-length physical key.

Parameters

AdmissionPolicy|Backoff|Cooldown $policy
string|null $limiterName

Return Value

string

at line 65
protected string policyIdentity(AdmissionPolicy|Backoff|Cooldown $policy)

Build the stable policy portion of an identity.

Parameters

AdmissionPolicy|Backoff|Cooldown $policy

Return Value

string

at line 100
protected string segment(string $domain, string $value)

Encode a domain-tagged length-prefixed identity segment.

Parameters

string $domain
string $value

Return Value

string