libratopublisher

package
v3.0.0-...-98f99b6 Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2015 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Publisher

type Publisher struct {
	// contains filtered or unexported fields
}

Publisher implements the canary.Publisher interface and is our means of ingesting canary.Measurements and converting them to Librato metrics.

func New

func New(user, token, source string) *Publisher

New takes a user, token and source and return a pointer to a Publisher.

func NewFromEnv

func NewFromEnv() (*Publisher, error)

NewFromEnv is a convenience func that wraps New, and populates the required arguments via environment variables. If required variables cannot be found, errors are returned.

func (*Publisher) Publish

func (p *Publisher) Publish(m canary.Measurement) (err error)

Publish takes a canary.Measurement and delivers it to the aggregator.

func (*Publisher) Start

func (p *Publisher) Start()

Start begins the event loop. This is a blocking operation and is expected to be run within a go routine.

Jump to

Keyboard shortcuts

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