Expand description
Pipeline orchestration.
Drives a request through the stages, authenticate, authorize, classify,
resolve, transform, dispatch, reverse-transform, egress (docs/04 §1),
wiring the other crates together through osproxy-core types and
osproxy-spi traits. It owns no low-level wire or parsing detail.
M1 lands the write-path core: build_write_batch turns a resolved routing
decision plus the request body into the epoch-stamped
WriteBatch the sink delivers. M2 adds the
get-by-id read path: the Pipeline maps a client’s logical id to the
physical id, fetches it through the Reader seam,
and strips the injected tenancy fields so the client sees its logical
document, the write→read round-trip symmetry the model rests on.
Structs§
- Admin
Policy - The operator’s admin pass-through policy: the cluster that answers admin
requests and the path prefixes permitted through. A request whose path does
not match an allowed prefix is rejected, so enabling pass-through for
_cat/healthdoes not silently open_cluster/settings. - NoQueue
- The default queue: async writes are unavailable. An async request against a
pipeline with no queue is refused with
422, never accepted-and-dropped. - Passthrough
Policy - Where a passthrough proxy forwards a matching request: one cluster and its base URL, plus the logical-index prefixes that select which requests pass through verbatim (empty ⇒ all of them).
- Pipeline
- Orchestrates requests through a tenancy router and a sink.
- Pipeline
Response - The response the pipeline produces for a handled request.
- Queue
Error - A failure to enqueue an async write. Carries a value-free reason only.
- Queued
Write - A mutation accepted for asynchronous fan-out: the fully-resolved,
epoch-stamped
WriteBatchthe sync path would have dispatched, plus the correlation/idempotency id and the ordering key. - Retry
Policy - How the proxy retries a transiently-unavailable placement backend.
- Stream
Search - The outcome of a streaming search: the upstream status and the response body
as a live
ByteBody, the hits transformed incrementally, all siblings (includingaggregations) passed through verbatim, none of it buffered.
Enums§
- Request
Error - A failure anywhere on the request path.
- Write
Mode - How a mutation is dispatched.
Traits§
- Write
Queue - A queue that durably accepts resolved write ops for downstream fan-out.
Functions§
- build_
write_ batch - Builds the single-document write batch for a resolved ingest request.
- op_
id_ for - Resolves the op id for a request: the validated client-supplied
X-Op-Id, or the proxy’s own request id when the header is absent or malformed. Always returns a usable id so the loop can always be correlated. - unsupported_
async - Why a mutation cannot be honored in async mode, if it cannot, a short,
value-free reason for the
400. These all need read-modify-write against the document’s current state, which does not exist at enqueue time, so async rejects them rather than silently mis-applying or dropping the precondition. - valid_
op_ id - Whether
candidateis an acceptable op id: non-empty, withinMAX_OP_ID_LEN, and limited to a safe key charset (A-Za-z0-9-_.:).