Documentation ¶
Overview ¶
Package cloudmetricreader provides functionality for interfacing with the cloud monitoring API.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CloudMetricReader ¶
type CloudMetricReader struct { QueryClient cloudmonitoring.TimeSeriesQuerier BackOffs *cloudmonitoring.BackOffIntervals }
CloudMetricReader handles how metrics will be read and returned.
func (*CloudMetricReader) Read ¶
func (r *CloudMetricReader) Read(ctx context.Context, config *configpb.Configuration, ip *instancepb.InstanceProperties, at agenttime.AgentTime) *mpb.MetricsCollection
Read reads metrics from the cloud monitoring API and returns a MetricsCollection.
type QueryClient ¶
type QueryClient struct {
Client *monitoring.QueryClient
}
QueryClient is a mockable wrapper around the cloud monitoring API Go client.
See QueryClient for the real client.
func (*QueryClient) QueryTimeSeries ¶
func (c *QueryClient) QueryTimeSeries(ctx context.Context, req *monitoringpb.QueryTimeSeriesRequest, opts ...gax.CallOption) ([]*mrpb.TimeSeriesData, error)
QueryTimeSeries fetches time series data that matches a query.
Click to show internal directories.
Click to hide internal directories.