Crate core
Expand description
async fn serve(&self, Context<S>, Request) -> Result<Response, Error>
Crate used by the end-user rama
crate and rama
crate authors alike.
Learn more about rama
:
- Github: https://github.com/plabayo/rama
- Book: https://ramaproxy.org/book/
§rama service
Heavily inspired by tower-service and the vast Tokio ecosystem which makes use of it.
Initially the goal was to rely on tower-service
directly, but it turned out to be
too restrictive and difficult to work with, for the use cases we have in Rama.
See https://ramaproxy.org/book/faq.html for more information regarding this and more.
Modules§
- Combinators for working with or in function of services.
- Context passed to and between services as input.
- Error utilities for rama and its users.
- Shutdown management for graceful shutdown of async-first applications.
- services to inspect requests and responses
- Layer type and utilities.
- matcher utilities for any middleware where need to match on incoming requests within a given
Context
- Runtime utilities used by Rama.
- Service type and utilities.
- Rama telemetry modules.
- Utilities to work with usernames and pull information out of it.
Structs§
- Context passed to and between services as input.
Traits§
- A layer that produces a Layered service (middleware(inner service)).
- A
Service
that produces rama services, to serve requests with, be it transport layer requests or application layer requests.