-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #41 from idky137/add_conf_toml
Expose conf
- Loading branch information
Showing
6 changed files
with
88 additions
and
5 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,24 @@ | ||
//! Zingo-Indexer daemon | ||
|
||
use zingoindexerlib::{config::IndexerConfig, indexer::Indexer}; | ||
use clap::Parser; | ||
use std::path::PathBuf; | ||
use zingoindexerlib::{config::load_config, indexer::Indexer}; | ||
|
||
#[derive(Parser, Debug)] | ||
#[command(name = "zindexer", about = "A server for Zingo-Indexer")] | ||
struct Args { | ||
/// Path to the configuration file | ||
#[arg(short, long, value_name = "FILE")] | ||
config: Option<PathBuf>, | ||
} | ||
|
||
#[tokio::main] | ||
async fn main() { | ||
Indexer::start(IndexerConfig::default()).await.unwrap(); | ||
Indexer::start(load_config( | ||
&Args::parse() | ||
.config | ||
.unwrap_or_else(|| PathBuf::from("./zingo-indexerd/zindexer.toml")), | ||
)) | ||
.await | ||
.unwrap(); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Configuration for Zingo-Indexer | ||
|
||
# Sets the TcpIngestor's status (true or false) | ||
tcp_active = true | ||
|
||
# Optional TcpIngestors listen port (use None or specify a port number) | ||
listen_port = 8137 | ||
|
||
# Sets the NymIngestor's and NymDispatchers status (true or false) | ||
nym_active = true | ||
|
||
# Optional Nym conf path used for micnet client conf | ||
nym_conf_path = "/tmp/indexer/nym" | ||
|
||
# LightWalletD listen port [DEPRECATED] | ||
lightwalletd_port = 9067 | ||
|
||
# Full node / validator listen port | ||
zebrad_port = 18232 | ||
|
||
# Optional full node Username | ||
node_user = "xxxxxx" | ||
|
||
# Optional full node Password | ||
node_password = "xxxxxx" | ||
|
||
# Maximum requests allowed in the request queue | ||
max_queue_size = 1024 | ||
|
||
# Maximum workers allowed in the worker pool | ||
max_worker_pool_size = 64 | ||
|
||
# Minimum number of workers held in the worker pool when idle | ||
idle_worker_pool_size = 4 |