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