Filo.Request (Filo v0.2.0)

Copy Markdown View Source

Dispatch of a single Hrana stream request against a host Filo.Executor.

handle/3 runs one decoded request map and returns {status, stream_result}, where status is :open (the stream continues) or :closed (a close request released the connection), and stream_result is the Hrana StreamResult map — %{"type" => "ok", ...} or %{"type" => "error", ...}.

Summary

Functions

Runs one decoded Hrana stream request through executor.

Types

status()

@type status() :: :open | :closed

Functions

handle(executor, conn, request, opts \\ [])

@spec handle(module(), Filo.Executor.conn(), map(), keyword()) :: {status(), map()}

Runs one decoded Hrana stream request through executor.

opts pass through to the result encoders — rows: :json makes execute/batch rows a pre-encoded Jason.Fragment (the JSON transports' fast path); the default :maps form is what the protobuf transports traverse.