Function start_daemon

Source
pub async fn start_daemon(
    settings: Settings,
    db_dir: PathBuf,
    log_file_path: Option<PathBuf>,
) -> Result<()>
Expand description

Run the daemon

also initializes the logger, database, and other necessary components.

§Arguments

  • settings - The settings to use.
  • db_dir - The directory where the database is stored. If the directory does not exist, it will be created.
  • log_file_path - The path to the file where logs will be written.

§Errors

If the daemon cannot be started, an error is returned.

§Panics

Panics if the peer address of the underlying TCP transport cannot be determined.