mirror of
https://github.com/katanemo/plano.git
synced 2026-05-10 00:02:43 +02:00
Code refactor and some improvements - see description (#194)
This commit is contained in:
parent
aa30353c85
commit
c6ba28dfcc
15 changed files with 100 additions and 115 deletions
|
|
@ -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;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue