(
state: &AppState,
session: &InspectorSession,
method: &str,
params: Value,
)
| 4658 | } |
| 4659 | |
| 4660 | async fn query_inspector_session( |
| 4661 | state: &AppState, |
| 4662 | session: &InspectorSession, |
| 4663 | method: &str, |
| 4664 | params: Value, |
| 4665 | ) -> Result<Value, String> { |
| 4666 | match &session.transport { |
| 4667 | InspectorSessionTransport::Connected => { |
| 4668 | let wait = inspector_request_timeout(method); |
| 4669 | state |
| 4670 | .inspectors |
| 4671 | .query_with_timeout(session.process_identifier, method, params, wait) |
| 4672 | .await |
| 4673 | } |
| 4674 | InspectorSessionTransport::Tcp { port } => { |
| 4675 | query_inspector_agent_on_port(*port, method, params).await |
| 4676 | } |
| 4677 | InspectorSessionTransport::RemoteService { |
| 4678 | server_url, |
| 4679 | access_token, |
| 4680 | } => { |
| 4681 | query_remote_service_inspector( |
| 4682 | server_url, |
| 4683 | access_token, |
| 4684 | session.process_identifier, |
| 4685 | method, |
| 4686 | params, |
| 4687 | ) |
| 4688 | .await |
| 4689 | } |
| 4690 | } |
| 4691 | } |
| 4692 | |
| 4693 | fn inspector_available_sources(info: &Value) -> Vec<String> { |
| 4694 | let mut sources = Vec::new(); |
no test coverage detected