Struct wasm_oidc_plugin::PauseRequests
source · pub(crate) struct PauseRequests {
pub(crate) original_path: Option<String>,
}
Expand description
The PauseRequests Context is the filter struct which is used when the filter is not configured. All requests are paused and queued by the RootContext. Once the filter is configured, the request is resumed by the RootContext.
Fields§
§original_path: Option<String>
Original path of the request
Trait Implementations§
source§impl Context for PauseRequests
impl Context for PauseRequests
fn get_current_time(&self) -> SystemTime
fn get_property(&self, path: Vec<&str>) -> Option<Vec<u8>>
fn set_property(&self, path: Vec<&str>, value: Option<&[u8]>)
fn dispatch_http_call( &self, upstream: &str, headers: Vec<(&str, &str)>, body: Option<&[u8]>, trailers: Vec<(&str, &str)>, timeout: Duration, ) -> Result<u32, Status>
fn on_http_call_response( &mut self, _token_id: u32, _num_headers: usize, _body_size: usize, _num_trailers: usize, )
fn get_http_call_response_headers(&self) -> Vec<(String, String)>
fn get_http_call_response_headers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn get_http_call_response_header(&self, name: &str) -> Option<String>
fn get_http_call_response_header_bytes(&self, name: &str) -> Option<Vec<u8>>
fn get_http_call_response_body( &self, start: usize, max_size: usize, ) -> Option<Vec<u8>>
fn get_http_call_response_trailers(&self) -> Vec<(String, String)>
fn get_http_call_response_trailers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn get_http_call_response_trailer(&self, name: &str) -> Option<String>
fn get_http_call_response_trailer_bytes(&self, name: &str) -> Option<Vec<u8>>
fn dispatch_grpc_call( &self, upstream_name: &str, service_name: &str, method_name: &str, initial_metadata: Vec<(&str, &[u8])>, message: Option<&[u8]>, timeout: Duration, ) -> Result<u32, Status>
fn on_grpc_call_response( &mut self, _token_id: u32, _status_code: u32, _response_size: usize, )
fn get_grpc_call_response_body( &self, start: usize, max_size: usize, ) -> Option<Vec<u8>>
fn cancel_grpc_call(&self, token_id: u32)
fn open_grpc_stream( &self, cluster_name: &str, service_name: &str, method_name: &str, initial_metadata: Vec<(&str, &[u8])>, ) -> Result<u32, Status>
fn on_grpc_stream_initial_metadata( &mut self, _token_id: u32, _num_elements: u32, )
fn get_grpc_stream_initial_metadata(&self) -> Vec<(String, Vec<u8>)>
fn get_grpc_stream_initial_metadata_value(&self, name: &str) -> Option<Vec<u8>>
fn send_grpc_stream_message( &self, token_id: u32, message: Option<&[u8]>, end_stream: bool, )
fn on_grpc_stream_message(&mut self, _token_id: u32, _message_size: usize)
fn get_grpc_stream_message( &mut self, start: usize, max_size: usize, ) -> Option<Vec<u8>>
fn on_grpc_stream_trailing_metadata( &mut self, _token_id: u32, _num_elements: u32, )
fn get_grpc_stream_trailing_metadata(&self) -> Vec<(String, Vec<u8>)>
fn get_grpc_stream_trailing_metadata_value(&self, name: &str) -> Option<Vec<u8>>
fn cancel_grpc_stream(&self, token_id: u32)
fn close_grpc_stream(&self, token_id: u32)
fn on_grpc_stream_close(&mut self, _token_id: u32, _status_code: u32)
fn get_grpc_status(&self) -> (u32, Option<String>)
fn call_foreign_function( &self, function_name: &str, arguments: Option<&[u8]>, ) -> Result<Option<Vec<u8>>, Status>
fn on_done(&mut self) -> bool
fn done(&self)
source§impl HttpContext for PauseRequests
impl HttpContext for PauseRequests
The context is used to process incoming HTTP requests when the filter is not configured.
source§fn on_http_request_headers(&mut self, _: usize, _: bool) -> Action
fn on_http_request_headers(&mut self, _: usize, _: bool) -> Action
This function is called when the request headers are received. As the filter is not configured, the request is paused and queued by the RootContext. Once the filter is configured, the request is resumed by the RootContext.
source§fn on_http_response_headers(
&mut self,
_num_headers: usize,
_end_of_stream: bool,
) -> Action
fn on_http_response_headers( &mut self, _num_headers: usize, _end_of_stream: bool, ) -> Action
When the filter is configured, this function is called once the root context resumes the request. This function sends a redirect to create a new context for the configured filter.
fn get_http_request_headers(&self) -> Vec<(String, String)>
fn get_http_request_headers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_request_headers(&self, headers: Vec<(&str, &str)>)
fn set_http_request_headers_bytes(&self, headers: Vec<(&str, &[u8])>)
fn get_http_request_header(&self, name: &str) -> Option<String>
fn get_http_request_header_bytes(&self, name: &str) -> Option<Vec<u8>>
fn set_http_request_header(&self, name: &str, value: Option<&str>)
fn set_http_request_header_bytes(&self, name: &str, value: Option<&[u8]>)
fn add_http_request_header(&self, name: &str, value: &str)
fn add_http_request_header_bytes(&self, name: &str, value: &[u8])
fn on_http_request_body( &mut self, _body_size: usize, _end_of_stream: bool, ) -> Action
fn get_http_request_body( &self, start: usize, max_size: usize, ) -> Option<Vec<u8>>
fn set_http_request_body(&self, start: usize, size: usize, value: &[u8])
fn on_http_request_trailers(&mut self, _num_trailers: usize) -> Action
fn get_http_request_trailers(&self) -> Vec<(String, String)>
fn get_http_request_trailers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_request_trailers(&self, trailers: Vec<(&str, &str)>)
fn set_http_request_trailers_bytes(&self, trailers: Vec<(&str, &[u8])>)
fn get_http_request_trailer(&self, name: &str) -> Option<String>
fn get_http_request_trailer_bytes(&self, name: &str) -> Option<Vec<u8>>
fn set_http_request_trailer(&self, name: &str, value: Option<&str>)
fn set_http_request_trailer_bytes(&self, name: &str, value: Option<&[u8]>)
fn add_http_request_trailer(&self, name: &str, value: &str)
fn add_http_request_trailer_bytes(&self, name: &str, value: &[u8])
fn resume_http_request(&self)
fn reset_http_request(&self)
fn get_http_response_headers(&self) -> Vec<(String, String)>
fn get_http_response_headers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_response_headers(&self, headers: Vec<(&str, &str)>)
fn set_http_response_headers_bytes(&self, headers: Vec<(&str, &[u8])>)
fn get_http_response_header(&self, name: &str) -> Option<String>
fn get_http_response_header_bytes(&self, name: &str) -> Option<Vec<u8>>
fn set_http_response_header(&self, name: &str, value: Option<&str>)
fn set_http_response_header_bytes(&self, name: &str, value: Option<&[u8]>)
fn add_http_response_header(&self, name: &str, value: &str)
fn add_http_response_header_bytes(&self, name: &str, value: &[u8])
fn on_http_response_body( &mut self, _body_size: usize, _end_of_stream: bool, ) -> Action
fn get_http_response_body( &self, start: usize, max_size: usize, ) -> Option<Vec<u8>>
fn set_http_response_body(&self, start: usize, size: usize, value: &[u8])
fn on_http_response_trailers(&mut self, _num_trailers: usize) -> Action
fn get_http_response_trailers(&self) -> Vec<(String, String)>
fn get_http_response_trailers_bytes(&self) -> Vec<(String, Vec<u8>)>
fn set_http_response_trailers(&self, trailers: Vec<(&str, &str)>)
fn set_http_response_trailers_bytes(&self, trailers: Vec<(&str, &[u8])>)
fn get_http_response_trailer(&self, name: &str) -> Option<String>
fn get_http_response_trailer_bytes(&self, name: &str) -> Option<Vec<u8>>
fn set_http_response_trailer(&self, name: &str, value: Option<&str>)
fn set_http_response_trailer_bytes(&self, name: &str, value: Option<&[u8]>)
fn add_http_response_trailer(&self, name: &str, value: &str)
fn add_http_response_trailer_bytes(&self, name: &str, value: &[u8])
fn resume_http_response(&self)
fn reset_http_response(&self)
fn send_http_response( &self, status_code: u32, headers: Vec<(&str, &str)>, body: Option<&[u8]>, )
fn send_grpc_response( &self, grpc_status: GrpcStatusCode, grpc_status_message: Option<&str>, custom_metadata: Vec<(&str, &[u8])>, )
fn on_log(&mut self)
Auto Trait Implementations§
impl Freeze for PauseRequests
impl RefUnwindSafe for PauseRequests
impl Send for PauseRequests
impl Sync for PauseRequests
impl Unpin for PauseRequests
impl UnwindSafe for PauseRequests
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