Skip to main content

Crate ranvier_http

Crate ranvier_http 

Source
Expand description

§ranvier-http - HTTP Ingress Adapter for Ranvier

This crate provides the Tower-native boundary layer for Ranvier. It implements Ranvier::http() as an Ingress Circuit Builder (Discussion 193).

§Key Components

  • Ranvier::http() - Entry point for building HTTP ingress
  • HttpIngress - Builder for configuring routes and server
  • RanvierService - Tower Service adapter for Axon execution

§Example

use ranvier_core::prelude::*;
use ranvier_http::prelude::*;

let hello = Axon::new("Hello")
    .then(|_| async { "Hello, Ranvier!" });

Ranvier::http()
    .bind("127.0.0.1:3000")
    .route("/", hello)
    .run()
    .await?;

Re-exports§

pub use ingress::HttpIngress;
pub use ingress::Ranvier;
pub use service::RanvierService;

Modules§

ingress
Ingress Module - Flat API Entry Point
prelude
Prelude module for convenient imports
service
RanvierService - Tower Service Adapter