Expand description
§UXUM
An opinionated backend service framework based on axum.
§Project goals
- Minimum boilerplate code.
- Minimal performance impact from features not in use.
- Metrics, tracing, OpenAPI and common service support features available out of the box.
- Ready to be deployed on a local server, VM or container, or in the cloud.
§Project non-goals
- Performance and feature parity with bare axum. Straight-up axum without all bells and whistles provided by this framework will always be a bit faster and more flexible.
- Database access layers and connection pools. This is out of scope for this project.
§Supported crate features
grpc
: support nesting Tonic GRPC services inside Axum server instance.systemd
: enable systemd integration for service notifications and watchdog support (Linux only).
Modules§
- prelude
- Commonly imported types for use in applications.
- reexport
- Centralized place to re-export dependency crates
- state
- State extractor support for method handlers.
Structs§
- ApiDoc
Builder - Builder for API documentation spec and UI.
- AppBuilder
- Builder for application routes.
- AppConfig
- Top-level application configuration.
- Auth
Config - Authentication provider configuration.
- Auth
Layer - Authentication and authorization
tower
layer. - Basic
Auth Extractor - Authentication extractor (front-end) for HTTP Basic authentication.
- Config
Auth Provider - Authentication provider (back-end) that uses users and roles stored in app configuration.
- Cors
Config - CORS configuration for a handler.
- Deadline
- Cutoff time after which the request must be timed out.
- Handle
- Handle for starting and controlling the server.
- Handler
Buffer Config - Configuration for request buffering queue layer.
- Handler
Config - Configuration of a single handler.
- Handler
Name - Static handler name.
- Handler
Rate Limit Config - Configuration for rate-limiting layer.
- Handler
Timeout Config - Handler request timeout configuration.
- Header
Auth Extractor - Authentication extractor (front-end) that gets user and password from HTTP headers.
- Http1
Config - HTTP/1 protocol configuration
- Http2
Config - HTTP/2 protocol configuration.
- Http2
Keepalive Config - HTTP/2 keep-alive configuration.
- Http
Client Config - HTTP client configuration.
- IpConfig
- IP-level configuration.
- Logging
Config - Logging configuration.
- Metrics
Builder - Configuration and builder for metrics subsystem.
- Metrics
State - Metrics state
tower
layer. - NoOp
Auth Extractor - Authentication extractor (front-end) which does nothing.
- NoOp
Auth Provider - Authentication provider (back-end) which does nothing.
- Probe
Config - Configuration for service probes and management mode API.
- Probe
State - Shared state for probes and maintenance mode API.
- Response
Extension - Response layer for adding an extension.
- Response
Schema - Object for documenting handler responses as OpenAPI schema.
- Role
Config - Role configuration.
- Runtime
Config - Tokio runtime configuration.
- Server
Builder - Builder for HTTP server
- Service
Config - Root container for app configuration.
- Service
Config Builder - Builder for service configuration.
- Service
Notifier - Interact with service supervisor.
- Signal
Stream - Unified listener for all handled signals.
- TcpConfig
- TCP-level configuration.
- TcpKeepalive
Config - TCP keepalive configuration.
- Tracing
Config - OpenTelemetry tracing configuration.
- User
Config - User configuration.
- UserId
- User ID.
- Watchdog
Config - Configuration for runtime watchdog.
Enums§
- ApiDoc
Error - Error type used in API doc objects.
- AppBuilder
Error - Error type used in app builder.
- Auth
Error - Error type used in authentication and authorization layer.
- Handle
Error - Error type returned by uxum handle.
- Http
Client Error - Error type used in HTTP client subsystem.
- Metrics
Error - Error type used in metrics subsystem.
- Rate
Limit Error - Error type returned by rate-limiting layer.
- Runtime
Error - Error type returned when building a runtime.
- Server
Builder Error - Error type returned by server builder.
- Service
Config Error - Top-level service configuration error type.
- Signal
Error - Signal handling error.
- Timeout
Error - Error type returned by timeout layer.
- User
Password - Various ways of storing client password.
Statics§
- CURRENT_
DEADLINE - Deadline of currently executing request, if any.
- CURRENT_
REQUEST_ ID - Request ID of currently executing request, if any.
Traits§
- Auth
Extractor - Authentication extractor (front-end) trait.
- Auth
Provider - Authentication provider (back-end) trait.
- GetResponse
Schemas - Trait used to generate OpenAPI schemas from handler response types.
- Handler
Ext - Application API method handler object trait.
Attribute Macros§
- handler
- Attribute macro for declaring service endpoints.