conveymetric

package
v1.3.1 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2019 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

View Source
const UnknownLabel = "unknown"

UnknownLabel is a constant for when key/tag can not be found in the C JSON

Variables

This section is empty.

Functions

This section is empty.

Types

type Closure

type Closure func()

Closure will be returned after Update(), this should be used to update the struct, aka decrement the count

type Interface

type Interface interface {
	// Update takes the convey JSON to update internal struct, and return a closure to update the struct again, or an
	// error
	//
	// Note: Closure should only be called once.
	Update(data convey.C) (Closure, error)
}

Interface provides a way of updating an internal resource

func NewConveyMetric

func NewConveyMetric(gauge metrics.Gauge, tag string, label string) Interface

NewConveyMetric produces an Interface where gauge is the internal structure to update, tag is the key in the C JSON to update the gauge, and label is the `key` for the gauge cardinality.

Note: The Gauge must have the label as one of the constant labels, (aka. the name of the gauge)

Jump to

Keyboard shortcuts

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