Skip to content

Commit 733f735

Browse files
committed
docs: add cli docs
Signed-off-by: Gustavo Inacio <[email protected]>
1 parent d40cb19 commit 733f735

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

crates/tap-agent/src/cli.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
// Copyright 2023-, Edge & Node, GraphOps, and Semiotic Labs.
22
// SPDX-License-Identifier: Apache-2.0
33

4+
//! # Cli
5+
//! Simple [clap] implementation of our Cli.
6+
47
use std::path::PathBuf;
58

69
use clap::Parser;
@@ -11,6 +14,7 @@ use tracing::{
1114
};
1215
use tracing_subscriber::{EnvFilter, FmtSubscriber};
1316

17+
/// A [clap::Parser] that contains the path to the configuration
1418
#[derive(Parser)]
1519
#[command(version)]
1620
pub struct Cli {
@@ -38,6 +42,7 @@ fn init_tracing(format: String) -> Result<(), SetGlobalDefaultError> {
3842
}
3943
}
4044

45+
/// Helper function that parses the Cli and uses the provided arguments to return a [IndexerConfig]
4146
pub fn get_config() -> anyhow::Result<IndexerConfig> {
4247
let cli = Cli::parse();
4348
let config = IndexerConfig::parse(ConfigPrefix::Tap, cli.config.as_ref()).map_err(|e| {

0 commit comments

Comments
 (0)