Skip to content

Commit

Permalink
fix naming
Browse files Browse the repository at this point in the history
  • Loading branch information
jiacai2050 committed Mar 13, 2023
1 parent b2f7dd9 commit e88784f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions server/src/handlers/influxdb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ use crate::{
instance::InstanceRef, schema_config_provider::SchemaConfigProviderRef,
};

pub struct Influxdb<Q> {
pub struct InfluxDb<Q> {
instance: InstanceRef<Q>,
schema_config_provider: SchemaConfigProviderRef,
}
Expand Down Expand Up @@ -68,7 +68,7 @@ impl From<Bytes> for WriteRequest {

pub type WriteResponse = ();

impl<Q: QueryExecutor + 'static> Influxdb<Q> {
impl<Q: QueryExecutor + 'static> InfluxDb<Q> {
pub fn new(instance: InstanceRef<Q>, schema_config_provider: SchemaConfigProviderRef) -> Self {
Self {
instance,
Expand Down Expand Up @@ -229,7 +229,7 @@ fn convert_influx_value(field_value: FieldValue) -> Value {
// TODO: Request and response type don't match influxdb's API now.
pub async fn query<Q: QueryExecutor + 'static>(
ctx: RequestContext,
db: Arc<Influxdb<Q>>,
db: Arc<InfluxDb<Q>>,
req: QueryRequest,
) -> std::result::Result<impl Reply, Rejection> {
db.query(ctx, req)
Expand All @@ -241,7 +241,7 @@ pub async fn query<Q: QueryExecutor + 'static>(
// TODO: Request and response type don't match influxdb's API now.
pub async fn write<Q: QueryExecutor + 'static>(
ctx: RequestContext,
db: Arc<Influxdb<Q>>,
db: Arc<InfluxDb<Q>>,
req: WriteRequest,
) -> std::result::Result<impl Reply, Rejection> {
db.write(ctx, req)
Expand Down
8 changes: 4 additions & 4 deletions server/src/http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ use crate::{
error_util,
handlers::{
self,
influxdb::{self, Influxdb},
influxdb::{self, InfluxDb},
prom::CeresDBStorage,
query::Request,
},
Expand Down Expand Up @@ -114,7 +114,7 @@ pub struct Service<Q> {
instance: InstanceRef<Q>,
profiler: Arc<Profiler>,
prom_remote_storage: RemoteStorageRef<RequestContext, crate::handlers::prom::Error>,
influxdb: Arc<Influxdb<Q>>,
influxdb: Arc<InfluxDb<Q>>,
tx: Sender<()>,
config: HttpConfig,
}
Expand Down Expand Up @@ -403,7 +403,7 @@ impl<Q: QueryExecutor + 'static> Service<Q> {

fn with_influxdb(
&self,
) -> impl Filter<Extract = (Arc<Influxdb<Q>>,), Error = Infallible> + Clone {
) -> impl Filter<Extract = (Arc<InfluxDb<Q>>,), Error = Infallible> + Clone {
let influxdb = self.influxdb.clone();
warp::any().map(move || influxdb.clone())
}
Expand Down Expand Up @@ -477,7 +477,7 @@ impl<Q: QueryExecutor + 'static> Builder<Q> {
instance.clone(),
schema_config_provider.clone(),
));
let influxdb = Arc::new(Influxdb::new(instance.clone(), schema_config_provider));
let influxdb = Arc::new(InfluxDb::new(instance.clone(), schema_config_provider));
let (tx, rx) = oneshot::channel();

let service = Service {
Expand Down

0 comments on commit e88784f

Please sign in to comment.