docs.rs failed to build nstreams-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Embeddable nstreams service for wiring into existing application endpoints.
Example (Axum)
use axum::Router;
use nstreams::NStreams;
# async fn example() -> Result<(), Box<dyn std::error::Error>> {
let database_url = "postgres://...";
let amqp_url = "amqp://guest:guest@localhost:5672/";
let nstreams = NStreams::builder()
.database_url(database_url)
.amqp_url(amqp_url)
.build()
.await?;
nstreams.spawn_worker().await?;
let app: Router = Router::new()
.nest("/api/streams", nstreams::axum::routes().with_state(nstreams));
# Ok(())
# }