Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct {
// contains filtered or unexported fields
}
Adapter allows querying and writing Stackdriver metrics.
func NewAdapter ¶
NewAdapter returns a new Stackdriver adapter.
func (*Adapter) CreateTimeseries ¶
func (a *Adapter) CreateTimeseries(ctx context.Context, project, name string, desc *metricpb.MetricDescriptor, series []*monitoringpb.TimeSeries) error
CreateTimeseries writes time series data (new data points) for a given metric into Stackdriver. It also creates a metric descriptor if it does not exist.
func (*Adapter) LatestTimestamp ¶
LatestTimestamp determines the timestamp of a latest point for a given metric in SD. If metric does not exist, a timestamp which is `lookBackInterval` ago in the past is returned to backfill some data.
type MetricClient ¶
type MetricClient interface { CreateMetricDescriptor(context.Context, *monitoringpb.CreateMetricDescriptorRequest) (*metricpb.MetricDescriptor, error) GetMetricDescriptor(context.Context, *monitoringpb.GetMetricDescriptorRequest) (*metricpb.MetricDescriptor, error) DeleteMetricDescriptor(ctx context.Context, req *monitoringpb.DeleteMetricDescriptorRequest) error CreateTimeSeries(context.Context, *monitoringpb.CreateTimeSeriesRequest) error ListTimeSeries(context.Context, *monitoringpb.ListTimeSeriesRequest) ([]*monitoringpb.TimeSeries, error) Close() error }
MetricClient defines Stackdriver functions used by the metric adapter.
Click to show internal directories.
Click to hide internal directories.