Skip to main content

serve

Function serve 

Source
async fn serve(
    port: u16,
    controller: ControllerService,
    identity: Option<Identity>,
) -> Result<(), Box<dyn Error>>
Expand description

Serve the controller on [::]:port, optionally with TLS.

§Arguments

  • port - the port to listen on
  • controller - the Orchestrator service instance
  • identity - the TLS certificate and private key, or None when using no TLS

§Errors

If the address cannot be parsed, the TLS identity is rejected, or the port cannot be served.