fn on_grpc_call_response(&mut self, token_id: u32, status_code: u32, response_size: usize) {
        info!("gRPC response received");
        info!("{}", token_id.to_string());
        info!("{}", status_code.to_string());
        info!("{}", response_size.to_string());
        match self.get_grpc_call_response_body(0, response_size) {
            Some(bytes) => {
                let response: Response = Message::parse_from_bytes(&bytes).unwrap();
                info!("response: {:?}", response);
                if response.get_path_type() == "REQUEST_PATH" {
                    self.set_http_request_header("x-request-header", Some(response.get_header()));
                    self.resume_http_request()
                } else {
                    self.set_http_response_header("x-response-header", Some(response.get_header()));
                    self.resume_http_response()
                }
            }
            None => {
                panic!("Empty response received !!!");
            }
        }
    }
// This callback is invoked when the filter receives a response for a gRPC unary call made during
// on_http_request_headers or on_http_response_headers. Use the status_code to handle errors.
This callback is invoked when the filter receives a response for a gRPC unary call made during
on_http_request_headers or on_http_response_headers. Use the status_code to handle errors.
This callback is invoked when the filter receives a response for a gRPC unary call made during on_http_request_headers or on_http_response_headers . Use the status_code to handle errors .
fn on_grpc_call_response(&mut self, token_id: u32, status_code: u32, response_size: usize) {
        info!("gRPC response received");
        info!("{}", token_id.to_string());
        info!("{}", status_code.to_string());
        info!("{}", response_size.to_string());
        match self.get_grpc_call_response_body(0, response_size) {
            Some(bytes) => {
                let response: Response = Message::parse_from_bytes(&bytes).unwrap();
                info!("response: {:?}", response);
                if response.get_path_type() == "REQUEST_PATH" {
                    self.set_http_request_header("x-request-header", Some(response.get_header()));
                    self.resume_http_request()
                } else {
                    self.set_http_response_header("x-response-header", Some(response.get_header()));
                    self.resume_http_response()
                }
            }
            None => {
                panic!("Empty response received !!!");
            }
        }
    }
fn on_grpc_call_response ( & mut self , token_id : u32 , status_code : u32 , response_size : usize ) { info ! ( " " ) ; info ! ( " " token_id to_string ( ) ) ; info ! ( " " status_code to_string ( ) ) ; info ! ( " " response_size to_string ( ) ) ; match self . get_grpc_call_response_body ( 0 , response_size ) { Some ( bytes ) => { let response : Response = Message :: parse_from_bytes ( & bytes ) . unwrap ( ) ; info ! ( " " response ) ; if response . get_path_type ( ) == " " { self . set_http_request_header ( " " , Some ( response . get_header ( ) ) ) ; self . resume_http_request ( ) } else { self . set_http_response_header ( " " , Some ( response . get_header ( ) ) ) ; self . resume_http_response ( ) } } None => { panic ! ( " " ) ; } } }
This callback is invoked when the filter receives a response for a gRPC unary call made during
on_http_request_headers or on_http_response_headers.
This callback is invoked when the filter receives a response for a gRPC unary call made during on_http_request_headers or on_http_response_headers .
&mut self
token_id
u32
status_code
u32
response_size
usize
&mut self
token_id
u32
status_code
u32
response_size
usize