1#![allow(clippy::print_stdout)]
16mod bench;
17mod data;
18mod database;
19pub mod error;
20mod metadata;
21
22use async_trait::async_trait;
23use clap::Parser;
24use common_error::ext::BoxedError;
25pub use database::DatabaseClient;
26use error::Result;
27
28pub use crate::bench::BenchTableMetadataCommand;
29pub use crate::data::DataCommand;
30pub use crate::metadata::MetadataCommand;
31
32#[async_trait]
33pub trait Tool: Send + Sync {
34 async fn do_work(&self) -> std::result::Result<(), BoxedError>;
35}
36
37#[derive(Debug, Parser)]
38pub(crate) struct AttachCommand {
39 #[clap(long)]
40 pub(crate) grpc_addr: String,
41 #[clap(long)]
42 pub(crate) meta_addr: Option<String>,
43 #[clap(long, action)]
44 pub(crate) disable_helper: bool,
45}
46
47impl AttachCommand {
48 #[allow(dead_code)]
49 async fn build(self) -> Result<Box<dyn Tool>> {
50 unimplemented!("Wait for https://github.com/GreptimeTeam/greptimedb/issues/2373")
51 }
52}