pub struct QueryService { /* private fields */ }Expand description
Implements a client for the Cloud Monitoring API.
§Service Description
The QueryService API is used to manage time series data in Cloud Monitoring. Time series data is a collection of data points that describes the time-varying values of a metric.
§Configuration
QueryService has various configuration parameters, the defaults should
work with most applications.
§Pooling and Cloning
QueryService holds a connection pool internally, it is advised to
create one and the reuse it. You do not need to wrap QueryService in
an Rc or Arc to reuse it, because it already uses an Arc
internally.
Implementations§
Source§impl QueryService
impl QueryService
Sourcepub async fn new_with_config(conf: ClientConfig) -> Result<Self>
pub async fn new_with_config(conf: ClientConfig) -> Result<Self>
Creates a new client with the specified configuration.
Sourcepub fn from_stub<T>(stub: T) -> Selfwhere
T: QueryService + 'static,
pub fn from_stub<T>(stub: T) -> Selfwhere
T: QueryService + 'static,
Creates a new client from the provided stub.
The most common case for calling this function is when mocking the client.
Sourcepub fn query_time_series(&self, name: impl Into<String>) -> QueryTimeSeries
pub fn query_time_series(&self, name: impl Into<String>) -> QueryTimeSeries
Queries time series by using Monitoring Query Language (MQL). We recommend using PromQL instead of MQL. For more information about the status of MQL, see the MQL deprecation notice.
Trait Implementations§
Source§impl Clone for QueryService
impl Clone for QueryService
Source§fn clone(&self) -> QueryService
fn clone(&self) -> QueryService
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more