File tree Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Expand file tree Collapse file tree 1 file changed +5
-0
lines changed Original file line number Diff line number Diff line change 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+
47use std:: path:: PathBuf ;
58
69use clap:: Parser ;
@@ -11,6 +14,7 @@ use tracing::{
1114} ;
1215use tracing_subscriber:: { EnvFilter , FmtSubscriber } ;
1316
17+ /// A [clap::Parser] that contains the path to the configuration
1418#[ derive( Parser ) ]
1519#[ command( version) ]
1620pub 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]
4146pub 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| {
You can’t perform that action at this time.
0 commit comments