/// given a channel to talk with the management api, create a new
/// database with the specified name configured with a 10MB mutable
/// buffer, partitioned on table
given a channel to talk with the management api, create a new
database with the specified name configured with a 10MB mutable
buffer, partitioned on table
given a channel to talk with the management api create a new database with the specified name configured with a 10MB mutable buffer partitioned on table
pub async fn create_readable_database(
    db_name: impl Into<String>,
    channel: tonic::transport::Channel,
) {
    let mut management_client = influxdb_iox_client::management::Client::new(channel);
    let rules = DatabaseRules {
        name: db_name.into(),
        partition_template: Some(PartitionTemplate {
            parts: vec![partition_template::Part {
                part: Some(partition_template::part::Part::Table(Empty {})),
            }],
        }),
        lifecycle_rules: Some(LifecycleRules {
            buffer_size_hard: 1024 * 1024,
            ..Default::default()
        }),
        ..Default::default()
    };
    management_client
        .create_database(rules.clone())
        .await
        .expect("create database failed");
}
pub async fn create_readable_database ( db_name : impl Into < String > , channel : tonic :: transport :: Channel , ) { let mut management_client = influxdb_iox_client :: management :: Client :: new ( channel ) ; let rules = DatabaseRules { name : db_name . into ( ) , partition_template : Some ( PartitionTemplate { parts : vec ! [ partition_template Part { part Some ( partition_template part Part Table ( Empty { } ) ) } ] , } ) , lifecycle_rules : Some ( LifecycleRules { buffer_size_hard : 1024 * 1024 , .. Default :: default ( ) } ) , .. Default :: default ( ) } ; management_client . create_database ( rules . clone ( ) ) . await . expect ( " " ) ; }
given a channel to talk with the management api, create a new
database with the specified name configured with a 10MB mutable
buffer, partitioned on table
given a channel to talk with the management api create a new database with the specified name configured with a 10MB mutable buffer partitioned on table
db_name
impl Into<String>
channel
tonic::transport::Channel