pkgmetrics

package
v0.0.0-...-15a92f0 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2016 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupMetrics

func SetupMetrics(appName string, env Env) (metrics.Registry, error)

SetupMetrics sets up metrics.

The returned metrics.Registry can be nil.

Types

type Env

type Env struct {
	// The email address for the Librato account to send stats to.
	// Must be set with LibratoAPIToken.
	// If not set and StathatUserKey not set, no metrics.Registry for stats will be created.
	LibratoEmailAddress string `env:"LIBRATO_EMAIL_ADDRESS"`
	// The API Token for the Librato account to send stats to.
	// Must be set with LibratoEmailAddress.
	// If not set and StathatUserKey not set, no metrics.Registry for stats will be created.
	LibratoAPIToken string `env:"LIBRATO_API_TOKEN"`
	// The StatHat user key to send stats to.
	// If not set and LibratoEmailAddress and LibratoAPIToken not set, no metrics.Registry for stats will be created.
	StathatUserKey string `env:"STATHAT_USER_KEY"`
}

Env defines a struct for environment variables that can be parsed with go.pedge.io/env.

Jump to

Keyboard shortcuts

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