You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 25, 2026. It is now read-only.
Writing down my ideas for what this feature can look like.
Expansion of the Service trait:
#[async_trait]// no longer needed?// addition of Clone would mean the implementing service is a cheap-to-clone struct, similar to axum statepubtraitService:Send + Clone{// rename to "start"?asyncfnbind(self,addr:SocketAddr) -> Result<(),Error>;asyncfnhealth_check(self) -> Result<(),Error>{Ok(())}asyncfnshutdown(self) -> Result<(),Error>{Ok(())}}
Describe the feature
Writing down my ideas for what this feature can look like.
Expansion of the Service trait:
Relevant code locations:
shuttle/runtime/src/rt.rs
Line 113 in 9fd65d9
shuttle/runtime/src/rt.rs
Line 324 in 9fd65d9
CLI would also need to be adjusted to not kill the runtime process, but to send SIGTERM instead, and perhaps SIGKILL after a timeout.
Suggestion or Example of how the feature would be used
The main way would be to manually implement Service.
Some macro magic to allow optionally defining the health check and shutdown methods at the root level would be nice. Something like:
Duplicate declaration