Skip to main content

Crate ingestix

Crate ingestix 

Source
Expand description

§Ingestix Core

A small “glue” micro-framework for building high-throughput ingestion pipelines.

Ingestix wires together two concepts:

  • An Ingestor that listens for incoming data and pushes messages into a bounded queue.
  • A Worker that pulls from that queue and processes messages concurrently.

The main orchestration point is Ingestix::launch.

§Quick mental model

  • Ingestor::run runs in the background and calls tx.send(msg) whenever it receives one.
  • Worker::process gets invoked for each queued message (up to your configured concurrency).
  • Failures follow a WorkerFailurePolicy (BestEffort vs FailFast).

§Feature flags

  • ingestors enables the built-in HTTP/TCP/UDP ingestors (modules: http, tcp, udp).
  • derive re-exports FlowWorker from the ingestix-derive proc-macro crate for generating Worker impls.
  • metrics enables the Prometheus monitor server (/metrics, /health/*).

§Doctest note

The public API is documented inline, but examples are intentionally marked ignore because they depend on your application-level message/config/state types.

Structs§

FlowCounterName
A lightweight wrapper around a metric name.
FlowGaugeName
A lightweight wrapper around a metric gauge name.
Ingestix
Main orchestrator that ties an Ingestor and a Worker together.
SharedContext
Shared runtime context shared between ingestor and worker.

Enums§

WorkerFailurePolicy
What should the core do when workers start failing.

Constants§

CURRENT_QUEUE
Current internal queue depth (best-effort gauge).
INGESTED_MSGS
Total successfully enqueued messages (ingestor -> core queue).
PROCESSED_MSGS
Total messages successfully processed by workers.
RECEIVED_MSGS
Total messages received by ingestors (before any validation / enqueueing).
REJECTED_INVALID_API_KEY
Requests rejected because an API key / token didn’t match.
REJECTED_INVALID_JSON
Messages rejected due to invalid JSON decoding.
REJECTED_OVERLOADED_QUEUE
Messages rejected because the internal queue was saturated.
REJECTED_OVERSIZED_PAYLOAD
Messages rejected because the payload exceeded the configured maximum size.
REJECTED_REQUEST_TIMEOUT
Requests rejected due to handler/reader timeout.

Traits§

Ingestor
Produces messages for the core loop.
Worker
Processes queued messages.

Attribute Macros§

async_trait