Struct Plugin Worker Client
Generated from cargo doc --no-deps -p nemo-relay -p nemo-relay-adaptive -p nemo-relay-pii-redaction -p nemo-relay-ffi -p nemo-relay-types -p nemo-relay-plugin -p nemo-relay-worker-proto -p nemo-relay-worker.
Implementations
impl PluginWorkerClient<Channel>
impl PluginWorkerClient<Channel>
connect
pub async fn connect<D>(dst: D) -> Result<Self, Error>where
D: TryInto<Endpoint>,
D::Error: Into<StdError>,
Attempt to create a new client by connecting to a given endpoint.
impl<T> PluginWorkerClient<T>where T: GrpcService<Body>, T::Error: Into<StdError>, T::ResponseBody: Body<Data = Bytes> + Send + 'static, <T::ResponseBody as Body>::Error: Into<StdError> + Send,
impl<T> PluginWorkerClient<T>where
T: GrpcService<Body>,
T::Error: Into<StdError>,
T::ResponseBody: Body<Data = Bytes> + Send + 'static,
<T::ResponseBody as Body>::Error: Into<StdError> + Send,
new
pub fn new(inner: T) -> Self
with_origin
pub fn with_origin(inner: T, origin: Uri) -> Self
with_interceptor
pub fn with_interceptor<F>(
inner: T,
interceptor: F,
) -> PluginWorkerClient<InterceptedService<T, F>>where
F: Interceptor,
T::ResponseBody: Default,
T: Service<Request<Body>, Response = Response<<T as GrpcService<Body>>::ResponseBody>>,
<T as Service<Request<Body>>>::Error: Into<StdError> + Send + Sync,
send_compressed
pub fn send_compressed(self, encoding: CompressionEncoding) -> Self
Compress requests with the given encoding.
This requires the server to support it otherwise it might respond with an error.
accept_compressed
pub fn accept_compressed(self, encoding: CompressionEncoding) -> Self
Enable decompressing responses.
max_decoding_message_size
pub fn max_decoding_message_size(self, limit: usize) -> Self
Limits the maximum size of a decoded message.
Default: 4MB
max_encoding_message_size
pub fn max_encoding_message_size(self, limit: usize) -> Self
Limits the maximum size of an encoded message.
Default: usize::MAX
handshake
pub async fn handshake(
&mut self,
request: impl IntoRequest<HandshakeRequest>,
) -> Result<Response<HandshakeResponse>, Status>
health
pub async fn health(
&mut self,
request: impl IntoRequest<HealthRequest>,
) -> Result<Response<HealthResponse>, Status>
validate
pub async fn validate(
&mut self,
request: impl IntoRequest<ValidateRequest>,
) -> Result<Response<ValidateResponse>, Status>
register
pub async fn register(
&mut self,
request: impl IntoRequest<RegisterRequest>,
) -> Result<Response<RegisterResponse>, Status>
invoke
pub async fn invoke(
&mut self,
request: impl IntoRequest<InvokeRequest>,
) -> Result<Response<InvokeResponse>, Status>
invoke_stream
pub async fn invoke_stream(
&mut self,
request: impl IntoRequest<InvokeRequest>,
) -> Result<Response<Streaming<StreamChunk>>, Status>
cancel_invocation
pub async fn cancel_invocation(
&mut self,
request: impl IntoRequest<CancelInvocationRequest>,
) -> Result<Response<WorkerAck>, Status>
shutdown
pub async fn shutdown(
&mut self,
request: impl IntoRequest<ShutdownRequest>,
) -> Result<Response<WorkerAck>, Status>
Trait Implementations
impl<T: Clone> Clone for PluginWorkerClient<T>
impl<T: Clone> Clone for PluginWorkerClient<T>
clone
fn clone(&self) -> PluginWorkerClient<T>
clone_from
fn clone_from(&mut self, source: &Self)
impl<T: Debug> Debug for PluginWorkerClient<T>
impl<T: Debug> Debug for PluginWorkerClient<T>
fmt
fn fmt(&self, f: &mut Formatter<'_>) -> Result