1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
use crate::{defaults, ops::forc_index_status};
use clap::Parser;

/// Check the status of a registered indexer.
#[derive(Debug, Parser)]
pub struct Command {
    /// Authentication header value
    #[clap(long, help = "Authentication header value.")]
    pub auth: Option<String>,

    /// URL at which to find indexer service.
    #[clap(long, default_value = defaults::INDEXER_SERVICE_HOST, help = "URL at which to find indexer service.")]
    pub url: String,

    /// Enable verbose logging.
    #[clap(short, long, help = "Enable verbose logging.")]
    pub verbose: bool,
}

pub async fn exec(command: Command) -> anyhow::Result<()> {
    forc_index_status::status(command).await
}