ReqLLM. StreamResponse. MetadataHandle
(ReqLLM v1.19.0)
View Source
Asynchronous metadata cache that allows multiple awaiters to share the same result.
The handle starts a background process that runs the supplied fetch fun exactly once.
Callers can await the metadata multiple times without causing repeated fetches or
task mailbox exhaustion. Call stop/1 when the cached metadata is no longer needed.
Summary
Functions
Returns a specification to start this module under a supervisor.
Stops a metadata handle and any in-progress metadata collection.
Types
@type t() :: pid()
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec stop(t()) :: :ok
Stops a metadata handle and any in-progress metadata collection.
This operation is idempotent and returns :ok when the handle has already stopped.