pub struct Inspector<C = ()> { /* private fields */ }Expand description
The inspector of a client (Inspector in inspector/inspector.ts),
from Zero::inspector.
zero-cache may require its admin password first: an RPC it refuses
fails with an error saying so (JS prompts for the password instead).
Once authenticate succeeds, the password is
presented again when a new connection isn’t authenticated yet.
An RPC waits for the connection. It fails when the connection drops before the answer, and when the client closes.
Implementations§
Source§impl<C> Inspector<C>
impl<C> Inspector<C>
Sourcepub fn client(&self) -> InspectorClient
pub fn client(&self) -> InspectorClient
This client.
Sourcepub fn client_group(&self) -> InspectorClientGroup
pub fn client_group(&self) -> InspectorClientGroup
This client’s group.
Sourcepub fn metrics(&self) -> Deferred<Metrics> ⓘ
pub fn metrics(&self) -> Deferred<Metrics> ⓘ
The client’s query metrics merged with the server’s
(inspectorMetrics).
Sourcepub fn clients(&self) -> Deferred<Vec<InspectorClient>> ⓘ
pub fn clients(&self) -> Deferred<Vec<InspectorClient>> ⓘ
Every client in the local store.
Sourcepub fn clients_with_queries(&self) -> Deferred<Vec<InspectorClient>> ⓘ
pub fn clients_with_queries(&self) -> Deferred<Vec<InspectorClient>> ⓘ
The clients in the local store the server has queries of: asks the server for each client’s queries.
Sourcepub fn server_version(&self) -> Deferred<String> ⓘ
pub fn server_version(&self) -> Deferred<String> ⓘ
zero-cache’s version.
Sourcepub fn analyze_query(
&self,
query: &impl ZeroQuery<C>,
options: AnalyzeQueryOptions,
) -> Deferred<AnalyzeQueryResult> ⓘ
pub fn analyze_query( &self, query: &impl ZeroQuery<C>, options: AnalyzeQueryOptions, ) -> Deferred<AnalyzeQueryResult> ⓘ
Asks the server to analyze query: by name and arguments for a
named query, and by its AST, with the server’s names, otherwise.
Sourcepub fn analyze_server_ast(
&self,
ast: &Ast,
options: AnalyzeQueryOptions,
) -> Deferred<AnalyzeQueryResult> ⓘ
pub fn analyze_server_ast( &self, ast: &Ast, options: AnalyzeQueryOptions, ) -> Deferred<AnalyzeQueryResult> ⓘ
Asks the server to analyze ast, which is sent as is: it must
have the server’s names.
Sourcepub fn analyze_named_query(
&self,
name: &str,
args: Vec<Value>,
options: AnalyzeQueryOptions,
) -> Deferred<AnalyzeQueryResult> ⓘ
pub fn analyze_named_query( &self, name: &str, args: Vec<Value>, options: AnalyzeQueryOptions, ) -> Deferred<AnalyzeQueryResult> ⓘ
Asks the server to analyze the named query name with args,
which its query handler resolves.
Sourcepub fn authenticate(&self, password: &str) -> Deferred<bool> ⓘ
pub fn authenticate(&self, password: &str) -> Deferred<bool> ⓘ
Authenticates with zero-cache’s admin password: true when it accepts it (or runs in a development mode that doesn’t check). zero-cache authenticates each connection; an accepted password is presented again on a new one.
Sourcepub fn format_planner_events(&self, events: &[PlanDebugEvent]) -> String
pub fn format_planner_events(&self, events: &[PlanDebugEvent]) -> String
The planner’s debug events (AnalyzeQueryResult::join_plans) as
text: each attempt’s costs, then the plan chosen.