daemon

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 30, 2014 License: GPL-3.0 Imports: 10 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Sources map[string]collectorBuilder = map[string]collectorBuilder{
		"redis":     buildRedisSource,
		"mysql":     buildMysqlSource,
		"memcached": buildMemcachedSource,
		"nginx":     buildNginxSource,
	}
)

Functions

func Prepare

func Prepare(ds *Store) error

Types

type Collector

type Collector interface {
	Name() string
	// return a hash of metric:value pairs
	Capture() (metricMap, error)
	Prepare(executor) error
	Watch(metricName string)
	ValidMetrics() []metric
}

type MemcachedSource

type MemcachedSource struct {
	Hostname string
	Port     string
	// contains filtered or unexported fields
}

func (*MemcachedSource) Capture

func (rs *MemcachedSource) Capture() (metricMap, error)

func (*MemcachedSource) Name

func (rs *MemcachedSource) Name() string

func (*MemcachedSource) Prepare

func (rs *MemcachedSource) Prepare(funk executor) error

func (*MemcachedSource) ValidMetrics

func (rs *MemcachedSource) ValidMetrics() []metric

func (*MemcachedSource) Watch

func (rs *MemcachedSource) Watch(metricName string)

type MysqlSource

type MysqlSource struct {
	Hostname string
	Port     string
	Socket   string
	Username string
	Password string
	// contains filtered or unexported fields
}

func (*MysqlSource) Capture

func (rs *MysqlSource) Capture() (metricMap, error)

func (*MysqlSource) Name

func (rs *MysqlSource) Name() string

func (*MysqlSource) Prepare

func (rs *MysqlSource) Prepare(funk executor) error

func (*MysqlSource) ValidMetrics

func (rs *MysqlSource) ValidMetrics() []metric

func (*MysqlSource) Watch

func (rs *MysqlSource) Watch(metricName string)

type RedisSource

type RedisSource struct {
	Hostname string
	Port     string
	Socket   string
	Password string
	// contains filtered or unexported fields
}

func (*RedisSource) Capture

func (rs *RedisSource) Capture() (metricMap, error)

func (*RedisSource) Name

func (rs *RedisSource) Name() string

func (*RedisSource) Prepare

func (rs *RedisSource) Prepare(funk executor) error

func (*RedisSource) ValidMetrics

func (rs *RedisSource) ValidMetrics() []metric

func (*RedisSource) Watch

func (rs *RedisSource) Watch(metricName string)

type Store

type Store struct {
	metrics.Store
	DaemonSpecific Collector
}

func NewStore

func NewStore(store metrics.Store, ds Collector) *Store

func (*Store) Collect

func (ds *Store) Collect(pid int) error

func (*Store) Watch

func (ds *Store) Watch(metricName string)

Jump to

Keyboard shortcuts

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