Expand description
§teaql-cloud-starter
One-line cloud bootstrap for TeaQL Rust services.
Similar to Spring Boot Starter, this crate packages all cloud capabilities
into a single CloudApp builder:
- Nacos v2 gRPC connection
- Service registration & discovery
- Configuration center integration
- Spring Boot Actuator-compatible health/info/metrics endpoints
- Graceful shutdown (SIGINT/SIGTERM → readiness=OUT_OF_SERVICE → deregister → drain → exit)
§Usage
ⓘ
use teaql_cloud_starter::CloudApp;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
CloudApp::new()
.nacos("127.0.0.1:8848")
.namespace("production")
.service_name("order-service-rust")
.port(8080)
.routes(my_business_routes())
.start()
.await?;
Ok(())
}Re-exports§
pub use teaql_cloud_actuator as actuator;pub use teaql_cloud_core as core;pub use teaql_cloud_nacos as nacos;pub use teaql_cloud_consul as consul;
Structs§
- Cloud
App - Cloud application builder — one-line bootstrap for all cloud capabilities.