pub fn Fn<S>(
ServerName: String,
Address: SocketAddr,
Router: Router,
ShutdownSignal: S,
)Expand description
Spawn a detached tokio task that serves Router on Address until
ShutdownSignal resolves.
ยงParameters
ServerName- label used in dev-log messages.Address- resolved socket address (callers should runcrate::Server::ValidateSocketAddress::Fnfirst).Router- constructed tonic Router with services already added.ShutdownSignal- anyFuture<Output = ()> + Send + 'static. When it resolves, the server gracefully stops accepting new connections and drains in-flight calls.