quic_token_cache (quic v1.3.1)
View SourceSummary
Functions
Drop all cached tokens. Useful for tests.
Store a token for the given endpoint. Overwrites any previous entry for the same endpoint; when the cache is at its size limit, the oldest entry is dropped.
Atomically return and remove a cached token for the endpoint, or empty if none is cached. Returning the token consumes it — per RFC 9000 §8.1.3 each NEW_TOKEN is meant to be used at most once.
Types
-type endpoint() :: {binary() | inet:ip_address(), inet:port_number()}.
Functions
-spec clear() -> ok.
Drop all cached tokens. Useful for tests.
Store a token for the given endpoint. Overwrites any previous entry for the same endpoint; when the cache is at its size limit, the oldest entry is dropped.
-spec start_link() -> {ok, pid()}.
Atomically return and remove a cached token for the endpoint, or empty if none is cached. Returning the token consumes it — per RFC 9000 §8.1.3 each NEW_TOKEN is meant to be used at most once.