MCPcopy Create free account
hub / github.com/clockwork-xyz/clockwork / parse_config_command

Function parse_config_command

cli/src/parser.rs:95–107  ·  view source on GitHub ↗
(matches: &ArgMatches)

Source from the content-addressed store, hash-verified

93}
94
95fn parse_config_command(matches: &ArgMatches) -> Result<CliCommand, CliError> {
96 match matches.subcommand() {
97 Some(("get", _)) => Ok(CliCommand::ConfigGet {}),
98 Some(("set", matches)) => Ok(CliCommand::ConfigSet {
99 admin: parse_pubkey("admin", matches).ok(),
100 epoch_thread: parse_pubkey("epoch_thread", matches).ok(),
101 hasher_thread: parse_pubkey("hasher_thread", matches).ok(),
102 }),
103 _ => Err(CliError::CommandNotRecognized(
104 matches.subcommand().unwrap().0.into(),
105 )),
106 }
107}
108
109fn parse_crontab_command(matches: &ArgMatches) -> Result<CliCommand, CliError> {
110 Ok(CliCommand::Crontab {

Callers 1

try_fromMethod · 0.85

Calls 1

parse_pubkeyFunction · 0.85

Tested by

no test coverage detected