stackdriver

package
v0.0.207 Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2017 License: Apache-2.0, Apache-2.0 Imports: 19 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Heartbeater

type Heartbeater interface {
	Start()
	Increment(string)
	Stop()
}

type Log

type Log struct {
	Payload  interface{}
	Labels   map[string]string
	Severity logging.Severity
}

type LogAdapter

type LogAdapter interface {
	PostLog(*Log)
	Flush()
}

func NewLogAdapter

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

type Metric

type Metric struct {
	Name      string
	Value     float64
	Labels    map[string]string
	EventTime time.Time
	Unit      string // TODO Should this be "1" if it's empty?
}

func (*Metric) Hash

func (m *Metric) Hash() string

type MetricAdapter

type MetricAdapter interface {
	PostMetrics([]Metric) error
}

func NewMetricAdapter

func NewMetricAdapter(projectID string, client MetricClient, heartbeater Heartbeater) (MetricAdapter, error)

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)

type MetricsBuffer

type MetricsBuffer interface {
	PostMetric(*Metric)
	IsEmpty() bool
}

func NewAutoCulledMetricsBuffer

func NewAutoCulledMetricsBuffer(ctx context.Context, logger lager.Logger, frequency time.Duration,
	size int, adapter MetricAdapter) (MetricsBuffer, <-chan error)

func NewMetricsBuffer

func NewMetricsBuffer(size int, adapter MetricAdapter) (MetricsBuffer, <-chan error)

Jump to

Keyboard shortcuts

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