canary: github.com/canaryio/canary Index | Files | Directories

package canary

import "github.com/canaryio/canary"

Index

Package Files

canary.go config.go publisher.go

type Canary Uses

type Canary struct {
    Config     Config
    Manifest   manifest.Manifest
    Publishers []Publisher
    Sensors    []sensor.Sensor
    OutputChan chan sensor.Measurement
    ReloadChan chan manifest.Manifest
}

func New Uses

func New(publishers []Publisher) *Canary

New returns a pointer to a new Publsher.

func (*Canary) Run Uses

func (c *Canary) Run()

func (*Canary) SignalHandler Uses

func (c *Canary) SignalHandler()

func (*Canary) StartAutoReload Uses

func (c *Canary) StartAutoReload(interval time.Duration)

type Config Uses

type Config struct {
    ManifestURL           string
    DefaultSampleInterval int
    RampupSensors         bool
    ReloadInterval        time.Duration
    MaxReloadFailures     int
    MaxSampleTimeout      int
}

type Publisher Uses

type Publisher interface {
    Publish(sensor.Measurement) error
}

Publisher is the interface that adds the Publish method.

Publish takes a Target, and Sample, and an error, and is expected to deliver that data somewhere.

Directories

PathSynopsis
pkg/canaryversion
pkg/libratoaggregator
pkg/libratopublisher
pkg/manifest
pkg/sampler
pkg/sensor
pkg/stdoutpublisher

Package canary imports 7 packages (graph). Updated 2017-02-14. Refresh now. Tools for package owners.