canary

package module
v0.0.0-...-b9af62b Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2017 License: MIT Imports: 7 Imported by: 9

README

canary

GoDoc Build Status MIT License

open monitoring for the open web.

canaryio/canary is the spiritual successor to canaryio/sensord and canaryio/canaryd.

You can read about the initial roadmap here.

components

  • canary - a cli tool that behaves in a similar fashion to ping
  • canaryd - a more complex server process designed to monitor more than one website

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Canary

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

func New

func New(publishers []Publisher) *Canary

New returns a pointer to a new Publsher.

func (*Canary) Run

func (c *Canary) Run()

func (*Canary) SignalHandler

func (c *Canary) SignalHandler()

func (*Canary) StartAutoReload

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

type Config

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

type Publisher

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

Path Synopsis
cmd
pkg

Jump to

Keyboard shortcuts

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