metrics

package
v0.0.0-...-c2832fb Latest Latest
Warning

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

Go to latest
Published: Feb 29, 2016 License: BSD-3-Clause Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFlushDuration  = "10s"
	DefaultUserAgent      = "cypress/1"
	DefaultInfluxUsername = "cypress"
)

Variables

View Source
var ErrInvalidMetric = errors.New("invalid metric")

Functions

This section is empty.

Types

type InfluxConfig

type InfluxConfig struct {
	Flush     cypress.Duration
	URL       string
	Username  string
	Password  string
	Database  string
	UserAgent string
}

func DefaultInfluxConfig

func DefaultInfluxConfig() *InfluxConfig

func (*InfluxConfig) Export

func (cfg *InfluxConfig) Export() *influxdb.Config

type MetricSink

type MetricSink struct {
	Registry metrics.Registry
}

func NewMetricSink

func NewMetricSink() *MetricSink

func (*MetricSink) Close

func (ms *MetricSink) Close() error

func (*MetricSink) EnableInflux

func (ms *MetricSink) EnableInflux(cfg *InfluxConfig) error

func (*MetricSink) FlushInflux

func (ms *MetricSink) FlushInflux(cfg *InfluxConfig) error

func (*MetricSink) Receive

func (ms *MetricSink) Receive(m *cypress.Message) error

func (*MetricSink) RunHTTP

func (ms *MetricSink) RunHTTP(addr string) error

type Metrics

type Metrics struct {
	HTTP   string `short:"l" long:"listen" description:"Port to run metrics HTTP service on"`
	Config string `short:"c" long:"config" description:"Configuration file of metrics"`
}

func (*Metrics) Execute

func (m *Metrics) Execute(args []string) error

type MetricsConfig

type MetricsConfig struct {
	HTTP   string
	Influx *InfluxConfig
}

type Plugin

type Plugin struct {
	Listen string `description:"host:port to run an internal HTTP server on"`
	Config string `description:"path to the metrics config file"`
}

func (*Plugin) Description

func (p *Plugin) Description() string

func (*Plugin) Receiver

func (p *Plugin) Receiver() (cypress.Receiver, error)

Jump to

Keyboard shortcuts

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