Skip to main content

Crate espresso_api

Crate espresso_api 

Source
Expand description

Espresso API server with both Axum (HTTP/JSON) and gRPC endpoints

Modulesยง

axum ๐Ÿ”’
Axum HTTP/JSON API handlers
error
Typed API errors for proper HTTP/gRPC status code mapping
handlers
Shared handler functions for API endpoints, used by both Axum and Tonic APIs.
proto
routes
tonic ๐Ÿ”’
gRPC service implementation
v1
V1 API module - legacy APIs
v2
V2 API module - proto-based APIs

Functionsยง

create_combined_router
Create a combined router serving both v1 and v2 APIs
create_reward_service
Create the reward gRPC service
create_router_v1
Create v1 router without OpenAPI documentation (internal types)
create_router_v2
Create v2 router with OpenAPI documentation (proto types)
serve_axum
Start Axum HTTP server with combined v1 and v2 APIs
serve_tonic
Start Tonic gRPC server