Function launch_server

Source
pub async fn launch_server(
    port: u16,
    db_manager: Arc<DatabaseManager>,
    pool: MySqlPool,
    cluster_manager: Arc<RwLock<ClusterManager>>,
    clickhouse_client: Client,
    shared_state_for_server: Arc<RwLock<SharedState>>,
) -> Result<(), Box<dyn Error>>
Expand description

Builds and launches the Rocket server with the provided configuration and dependencies.

§Arguments

  • port - The port to bind the server to.
  • db_manager - Shared database manager instance.
  • pool - Main database pool.
  • cluster_manager - Shared cluster manager instance.
  • clickhouse_client - ClickHouse client instance.
  • shared_state_for_server - Shared state for the server.

§Errors

Returns an error if the Rocket server fails to launch.