cloudmetricreader

package
v1.5.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

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

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL