KubeMQ.QueryResponse (kubemq v1.0.1)

Copy Markdown View Source

Response received after sending a query via KubeMQ.Client.send_query/2.

Fields

  • query_id (String.t()) — ID of the query that was executed.
  • executed (boolean()) — Whether the query was executed successfully.
  • executed_at (integer()) — Unix timestamp when the query was executed.
  • metadata (String.t() | nil) — Response metadata from the responder.

  • body (binary() | nil) — Response payload from the responder.

  • cache_hit (boolean()) — Whether the response was served from server-side cache.
  • error (String.t() | nil) — Error message if execution failed.

  • tags (%{String.t() => String.t()}) — Key-value tags from the responder.

Summary

Types

t()

@type t() :: %KubeMQ.QueryResponse{
  body: binary() | nil,
  cache_hit: boolean(),
  error: String.t() | nil,
  executed: boolean(),
  executed_at: integer(),
  metadata: String.t() | nil,
  query_id: String.t(),
  tags: %{required(String.t()) => String.t()}
}

Functions

from_response(response)

@spec from_response(map()) :: t()

new(opts \\ [])

@spec new(keyword()) :: t()