pub struct InvokerHandler { /* private fields */ }Implementations§
Source§impl InvokerHandler
impl InvokerHandler
pub fn new(app: Arc<AppShareData>) -> Self
pub fn add_handler( &mut self, url: &str, handler: Box<dyn PayloadHandler + Send + Sync + 'static>, )
pub fn match_handler<'a>( &'a self, url: &str, ) -> Option<&'a (dyn PayloadHandler + Send + Sync + 'static)>
pub fn ignore_active_err(&self, t: &str) -> bool
pub fn ignore_auth(&self, t: &str) -> bool
pub fn is_cluster_request(&self, t: &str) -> bool
pub fn add_raft_handler(&mut self, app_data: &Arc<AppShareData>)
pub fn add_config_handler(&mut self, app_data: &Arc<AppShareData>)
pub fn add_naming_handler(&mut self, app_data: &Arc<AppShareData>)
Trait Implementations§
Source§impl PayloadHandler for InvokerHandler
impl PayloadHandler for InvokerHandler
Source§fn get_log_args(
&self,
request_payload: &Payload,
request_meta: &RequestMeta,
) -> HandleLogArgs
fn get_log_args( &self, request_payload: &Payload, request_meta: &RequestMeta, ) -> HandleLogArgs
获取请求日志参数
fn handle<'life0, 'async_trait>(
&'life0 self,
request_payload: Payload,
request_meta: RequestMeta,
) -> Pin<Box<dyn Future<Output = Result<HandlerResult>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Auto Trait Implementations§
impl Freeze for InvokerHandler
impl !RefUnwindSafe for InvokerHandler
impl Send for InvokerHandler
impl Sync for InvokerHandler
impl Unpin for InvokerHandler
impl !UnwindSafe for InvokerHandler
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::RequestSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request