Hermes.Client.Request (hermes_mcp v0.9.1)
Represents a pending request in the MCP client.
This struct encapsulates all information about an in-progress request:
id
- The unique request IDmethod
- The MCP method being calledfrom
- The GenServer caller referencetimer_ref
- Reference to the request-specific timeout timerstart_time
- When the request started (monotonic time in milliseconds)
Summary
Types
@type t() :: %Hermes.Client.Request{ from: GenServer.from(), id: String.t(), method: String.t(), start_time: integer(), timer_ref: reference() }
Functions
Calculates the elapsed time for a request in milliseconds.
@spec new(%{ id: String.t(), method: String.t(), from: GenServer.from(), timer_ref: reference() }) :: t()
Creates a new request struct.
Parameters
attrs
- Map containing the request attributes:id
- The unique request ID:method
- The MCP method name:from
- The GenServer caller reference:timer_ref
- Reference to the request-specific timeout timer