web

package
v0.0.0-...-a19e79c Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2015 License: MIT Imports: 42 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func APIRedirect

func APIRedirect(w http.ResponseWriter, req *http.Request)

func Action

func Action(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Alerts

func Alerts(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Backup

func Backup(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Config

func ConfigTest

func ConfigTest(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request)

func DeleteMetadata

func DeleteMetadata(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Dir

func Dir(useLocal bool, name string) http.FileSystem

Dir returns a http.Filesystem for the embedded assets on a given prefix dir. If useLocal is true, the filesystem's contents are instead used.

func ErrorHistory

func ErrorHistory(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Expr

func Expr(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (v interface{}, err error)

func ExprGraph

func ExprGraph(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

ExprGraph returns an svg graph. The basename of the requested svg file should be a base64 encoded expression.

func FS

func FS(useLocal bool) http.FileSystem

FS returns a http.Filesystem for the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSByte

func FSByte(useLocal bool, name string) ([]byte, error)

FSByte returns the named file from the embedded assets. If useLocal is true, the filesystem's contents are instead used.

func FSMustByte

func FSMustByte(useLocal bool, name string) []byte

FSMustByte is the same as FSByte, but panics if name is not present.

func FSMustString

func FSMustString(useLocal bool, name string) string

FSMustString is the string version of FSMustByte.

func FSString

func FSString(useLocal bool, name string) (string, error)

FSString is the string version of FSByte.

func FilteredTagsetsByMetric

func FilteredTagsetsByMetric(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func GetMetadata

func GetMetadata(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Graph

func Graph(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

Graph takes an OpenTSDB request data structure and queries OpenTSDB. Use the json parameter to pass JSON. Use the b64 parameter to pass base64-encoded JSON.

func HealthCheck

func HealthCheck(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Host

func Host(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func IncidentEvents

func IncidentEvents(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Incidents

func Incidents(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func IndexTSDB

func IndexTSDB(w http.ResponseWriter, r *http.Request)

func JSON

func JSON(h func(miniprofiler.Timer, http.ResponseWriter, *http.Request) (interface{}, error)) http.Handler

func Last

func Last(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

Last returns the most recent datapoint for a metric+tagset. The metric+tagset string should be formated like os.cpu{host=foo}. The tag porition expects the that the keys will be in alphabetical order.

func Listen

func Listen(listenAddr string, devMode bool, tsdbHost string) error

func MetadataMetrics

func MetadataMetrics(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func MetricsByTagPair

func MetricsByTagPair(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func PutMetadata

func PutMetadata(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Relay

func Relay(dest string) http.Handler

func Rule

func Rule(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func RunEsc

func RunEsc()

Run esc to embed entire static directory into static.go

func RunTsc

func RunTsc()

Run tsc to compile all ts files into bosun.js

func ScheduleLockStatus

func ScheduleLockStatus(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Shorten

func Shorten(w http.ResponseWriter, r *http.Request)

func SilenceClear

func SilenceClear(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func SilenceGet

func SilenceGet(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func SilenceSet

func SilenceSet(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func Status

func Status(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func TagKeysByMetric

func TagKeysByMetric(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func TagValuesByMetricTagKey

func TagValuesByMetricTagKey(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func TagValuesByTagKey

func TagValuesByTagKey(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

func UniqueMetrics

func UniqueMetrics(t miniprofiler.Timer, w http.ResponseWriter, r *http.Request) (interface{}, error)

UniqueMetrics returns a sorted list of available metrics.

func Version

func Version(w http.ResponseWriter, r *http.Request)

Types

type Health

type Health struct {
	// RuleCheck is true if last check happened within the check frequency window.
	RuleCheck bool
}

type MultiError

type MultiError map[string]error

func (MultiError) Error

func (m MultiError) Error() string

type Res

type Res struct {
	*sched.Event
	Key expr.AlertKey
}

Jump to

Keyboard shortcuts

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