Documentation ¶
Index ¶
- Constants
- func AsDuration(str string) time.Duration
- func Contains(set string, k MetricKind, t ValueType) bool
- func IngestDelay(md *monitoring.MetricDescriptor) time.Duration
- func MetricAbbrs(md *monitoring.MetricDescriptor) (MetricKind, ValueType, string)
- func MetricKindLabel(md *monitoring.MetricDescriptor) string
- func NewCounterVec(system, subsys, name, help string, label_keys ...string) *prometheus.CounterVec
- func NewGaugeVec(system, subsys, name, help string, label_keys ...string) *prometheus.GaugeVec
- func NewHistVec(system, subsys, name, help string, buckets []float64, label_keys ...string) *prometheus.HistogramVec
- func SamplePeriod(md *monitoring.MetricDescriptor) time.Duration
- func SecondsSince(start time.Time) float64
- type Client
- func (m Client) GetLatestTimeSeries(ctx context.Context, ch chan<- *monitoring.TimeSeries, projectID string, ...)
- func (m Client) GetMetricDescs(ctx context.Context, ch chan<- *monitoring.MetricDescriptor, projectID string, ...)
- func (m Client) StreamLatestTimeSeries(ctx context.Context, projectID string, md *monitoring.MetricDescriptor, ...) <-chan *monitoring.TimeSeries
- func (m Client) StreamMetricDescs(ctx context.Context, projectID, prefix string) <-chan *monitoring.MetricDescriptor
- type MetricKind
- type ValueType
Constants ¶
View Source
const QuotaExceeded = 429
Variables ¶
This section is empty.
Functions ¶
func AsDuration ¶
func Contains ¶
func Contains(set string, k MetricKind, t ValueType) bool
Returns `true` if either `k` or `t` is contained in the string `set`.
func IngestDelay ¶
func MetricAbbrs ¶
func MetricAbbrs( md *monitoring.MetricDescriptor, ) (MetricKind, ValueType, string)
func MetricKindLabel ¶
func MetricKindLabel(md *monitoring.MetricDescriptor) string
func NewCounterVec ¶
func NewCounterVec( system, subsys, name, help string, label_keys ...string, ) *prometheus.CounterVec
func NewGaugeVec ¶
func NewGaugeVec( system, subsys, name, help string, label_keys ...string, ) *prometheus.GaugeVec
func NewHistVec ¶
func NewHistVec( system, subsys, name, help string, buckets []float64, label_keys ...string, ) *prometheus.HistogramVec
func SamplePeriod ¶
func SecondsSince ¶
Types ¶
type Client ¶
type Client struct {
*monitoring.Service
}
func MustMonitoringClient ¶
func (Client) GetLatestTimeSeries ¶
func (Client) GetMetricDescs ¶
func (Client) StreamLatestTimeSeries ¶
type MetricKind ¶
type MetricKind byte
const ( KCount MetricKind = 'C' KDelta MetricKind = 'D' KGauge MetricKind = 'G' )
Click to show internal directories.
Click to hide internal directories.