From 9c82c983e8bad182443ff03c9409fec31c406f15 Mon Sep 17 00:00:00 2001 From: Feliciss <10203-feliciss@users.noreply.0xacab.org> Date: Thu, 6 Jul 2023 21:42:30 -0600 Subject: [PATCH] [naming] rename start to serve to differentiate. --- crates/rooch/src/commands/relay/commands/mod.rs | 2 +- .../src/commands/relay/commands/{start.rs => serve.rs} | 6 +++--- crates/rooch/src/commands/relay/mod.rs | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) rename crates/rooch/src/commands/relay/commands/{start.rs => serve.rs} (97%) diff --git a/crates/rooch/src/commands/relay/commands/mod.rs b/crates/rooch/src/commands/relay/commands/mod.rs index 51cfca8c2e..7fd7008620 100644 --- a/crates/rooch/src/commands/relay/commands/mod.rs +++ b/crates/rooch/src/commands/relay/commands/mod.rs @@ -1,4 +1,4 @@ // Copyright (c) RoochNetwork // SPDX-License-Identifier: Apache-2.0 -pub mod start; +pub mod serve; diff --git a/crates/rooch/src/commands/relay/commands/start.rs b/crates/rooch/src/commands/relay/commands/serve.rs similarity index 97% rename from crates/rooch/src/commands/relay/commands/start.rs rename to crates/rooch/src/commands/relay/commands/serve.rs index f7f9939aa8..df8f71cdc0 100644 --- a/crates/rooch/src/commands/relay/commands/start.rs +++ b/crates/rooch/src/commands/relay/commands/serve.rs @@ -18,7 +18,7 @@ use rooch_ws_relay::server::config; use console_subscriber::ConsoleLayer; #[derive(Debug, Parser)] -pub struct StartCommand { +pub struct ServeCommand { #[clap(long = "database")] /// Use a directory as the location of the database db: Option, @@ -29,7 +29,7 @@ pub struct StartCommand { } #[async_trait] -impl CommandAction<()> for StartCommand { +impl CommandAction<()> for ServeCommand { async fn execute(self) -> RoochResult<()> { // get config file name from args let config_file_arg = self.config; @@ -68,7 +68,7 @@ impl CommandAction<()> for StartCommand { tracing_subscriber::fmt::try_init().unwrap(); } } - info!("Starting up ws relay"); + info!("Serving Rooch ws relay"); // get database directory from args let db_dir_arg = self.db; diff --git a/crates/rooch/src/commands/relay/mod.rs b/crates/rooch/src/commands/relay/mod.rs index ba9f9c6cda..6c4a71d092 100644 --- a/crates/rooch/src/commands/relay/mod.rs +++ b/crates/rooch/src/commands/relay/mod.rs @@ -6,7 +6,7 @@ pub mod commands; use crate::cli_types::CommandAction; use async_trait::async_trait; use clap::Parser; -use commands::start::StartCommand; +use commands::serve::ServeCommand; use rooch_types::error::RoochResult; #[derive(Parser)] @@ -19,7 +19,7 @@ pub struct Relay { impl CommandAction for Relay { async fn execute(self) -> RoochResult { match self.cmd { - RelayCommand::Start(start) => start.execute_serialized().await, + RelayCommand::Serve(serve) => serve.execute_serialized().await, } } } @@ -27,5 +27,5 @@ impl CommandAction for Relay { #[derive(clap::Subcommand)] #[clap(name = "relay")] pub enum RelayCommand { - Start(StartCommand), + Serve(ServeCommand), }