Module server

Source
Expand description

Logic to run the HTTP API server.

It contains two main structs: ApiServer and Launcher, and two main functions: start and start_tls.

The ApiServer struct is responsible for:

  • Starting and stopping the server.
  • Storing the configuration.

ApiServer relies on a launcher to start the actual server.

Structs§

ApiServer
A struct responsible for starting and stopping an API server with a specific configuration and keeping track of the started server.
Launcher
A struct responsible for starting the API server.
Running
The Running state of the ApiServer struct.
Stopped
The Stopped state of the ApiServer struct.

Enums§

Error
Errors that can occur when starting or stopping the API server.

Functions§

check_fn
Checks the Health by connecting to the API service endpoint.

Type Aliases§

RunningApiServer
An alias for the ApiServer struct with the Running state.
StoppedApiServer
An alias for the ApiServer struct with the Stopped state.