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