pub trait Deployment {
// Required methods
fn shutdown(&self) -> ShutdownHandle;
fn serve(
&mut self,
supervisor: ConnectionSupervisor,
services: Option<Arc<LiminalConnectionServices>>,
shutdown: ShutdownHandle,
) -> Result<(), ServerError>;
}Expand description
A deployment’s siblings run while the production exchange is listening.
Required Methods§
Sourcefn shutdown(&self) -> ShutdownHandle
fn shutdown(&self) -> ShutdownHandle
The shutdown signal shared with fatal production failures.
Sourcefn serve(
&mut self,
supervisor: ConnectionSupervisor,
services: Option<Arc<LiminalConnectionServices>>,
shutdown: ShutdownHandle,
) -> Result<(), ServerError>
fn serve( &mut self, supervisor: ConnectionSupervisor, services: Option<Arc<LiminalConnectionServices>>, shutdown: ShutdownHandle, ) -> Result<(), ServerError>
Serves until shutdown, ending siblings before returning for the store drain.
§Errors
A sibling could not start or stop; the exchange is still drained.
Dyn Compatibility§
This trait is dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".