stackdriver

package
v2.1.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2019 License: Apache-2.0, Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTelemetrySink

func NewTelemetrySink(logger lager.Logger, client MetricClient, projectID, subscriptionID, foundation string) telemetry.Sink

NewTelemetrySink provides a telemetry.Sink that writes metrics to Stackdriver Monitoring

Types

type LogAdapter

type LogAdapter interface {
	PostLog(*messages.Log)
	Flush() error
}

func NewLogAdapter

func NewLogAdapter(projectID string, batchCount int, batchDuration time.Duration, inFlight int) (LogAdapter, <-chan error)

NewLogAdapter returns a LogAdapter that can post to Stackdriver Logging.

type MetricAdapter

type MetricAdapter interface {
	PostMetrics([]*messages.Metric)
}

func NewMetricAdapter

func NewMetricAdapter(projectID string, client MetricClient, batchSize int, logger lager.Logger) (MetricAdapter, error)

NewMetricAdapter returns a MetricAdapater that can write to Stackdriver Monitoring

type MetricClient

type MetricClient interface {
	Post(*monitoringpb.CreateTimeSeriesRequest) error
	CreateMetricDescriptor(*monitoringpb.CreateMetricDescriptorRequest) error
	ListMetricDescriptors(*monitoringpb.ListMetricDescriptorsRequest) ([]*metricpb.MetricDescriptor, error)
}

func NewMetricClient

func NewMetricClient() (MetricClient, error)

Jump to

Keyboard shortcuts

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