pub struct IQResource<'c> { /* private fields */ }Expand description
client.iq() — accessor for Interactive Queries.
Implementations§
Source§impl<'c> IQResource<'c>
impl<'c> IQResource<'c>
Sourcepub async fn summary(self, agent_id: &str) -> Result<Value, PulseError>
pub async fn summary(self, agent_id: &str) -> Result<Value, PulseError>
GET /api/pulse/iq/agents/{id}/state — headline state summary.
Returns the IQSummary Value — always carries agentId,
queryable, backend, hotSize, hotBytes, coldSize,
coldBytes, lastCheckpointId, totalSize. When the agent has
no live streaming backend: queryable=false, backend="none",
numerics 0, lastCheckpointId=-1.
Sourcepub async fn get(self, agent_id: &str, key: &str) -> Result<Value, PulseError>
pub async fn get(self, agent_id: &str, key: &str) -> Result<Value, PulseError>
GET /api/pulse/iq/agents/{id}/state/value/{key} — point lookup.
Returns the IQValue Value (agentId, key, value — value
can be any JSON type including null).
§Errors
Returns PulseError::NotFound when the key is absent OR the
agent is not queryable. Inspect the variant’s body field:
error == "Key not found" vs error == "Agent has no queryable state" (with reason field) — to distinguish.
Sourcepub async fn scan(
self,
agent_id: &str,
opts: IQScanOptions,
) -> Result<Value, PulseError>
pub async fn scan( self, agent_id: &str, opts: IQScanOptions, ) -> Result<Value, PulseError>
GET /api/pulse/iq/agents/{id}/state/scan — paginated range scan.
Inspect truncated to decide if more data exists; paginate by
setting opts.start on the next call to the last returned key
plus a sentinel suffix.
Sourcepub async fn list_keys(
self,
agent_id: &str,
opts: IQScanOptions,
) -> Result<Value, PulseError>
pub async fn list_keys( self, agent_id: &str, opts: IQScanOptions, ) -> Result<Value, PulseError>
GET /api/pulse/iq/agents/{id}/state/keys — keys-only range scan.
Same shape as scan minus the values; keys field
is a JSON array of strings.
Sourcepub async fn query(
self,
agent_id: &str,
opts: IQQueryOptions,
) -> Result<Value, PulseError>
pub async fn query( self, agent_id: &str, opts: IQQueryOptions, ) -> Result<Value, PulseError>
POST /api/pulse/iq/agents/{id}/state/query — filtered / projected
/ grouped query.
When opts.group_by is set, the response shape is
{groups: [{groupKey, count}], groupCount, ...} instead of
{entries: [...], count, ...}.
§Errors
PulseError::Validationon invalid filter syntax (HTTP 400)PulseError::NotFoundwhen the agent is not queryable