Code refactor and some improvements - see description (#194)

This commit is contained in:
Adil Hafeez 2024-10-18 12:53:44 -07:00 committed by GitHub
parent aa30353c85
commit c6ba28dfcc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 100 additions and 115 deletions

View file

@ -1,4 +1,4 @@
use crate::stats::{Gauge, IncrementingMetric};
use crate::{errors::ClientError, stats::{Gauge, IncrementingMetric}};
use derivative::Derivative;
use log::debug;
use proxy_wasm::{traits::Context, types::Status};
@ -37,16 +37,6 @@ impl<'a> CallArgs<'a> {
}
}
#[derive(thiserror::Error, Debug)]
pub enum ClientError {
#[error("Error dispatching HTTP call to `{upstream_name}/{path}`, error: {internal_status:?}")]
DispatchError {
upstream_name: String,
path: String,
internal_status: Status,
},
}
pub trait Client: Context {
type CallContext: Debug;