zipper

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: BSD-2-Clause Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BuildVersion string

BuildVersion is replaced by ldflags

View Source
var Metrics = struct {
	Requests  *expvar.Int
	Responses *expvar.Int
	Errors    *expvar.Int

	Goroutines expvar.Func
	Uptime     expvar.Func

	FindRequests *expvar.Int
	FindErrors   *expvar.Int

	RenderRequests *expvar.Int
	RenderErrors   *expvar.Int

	InfoRequests *expvar.Int
	InfoErrors   *expvar.Int

	Timeouts *expvar.Int

	CacheSize   expvar.Func
	CacheItems  expvar.Func
	CacheMisses *expvar.Int
	CacheHits   *expvar.Int
}{
	Requests:  expvar.NewInt("requests"),
	Responses: expvar.NewInt("responses"),
	Errors:    expvar.NewInt("errors"),

	FindRequests: expvar.NewInt("find_requests"),
	FindErrors:   expvar.NewInt("find_errors"),

	RenderRequests: expvar.NewInt("render_requests"),
	RenderErrors:   expvar.NewInt("render_errors"),

	InfoRequests: expvar.NewInt("info_requests"),
	InfoErrors:   expvar.NewInt("info_errors"),

	Timeouts: expvar.NewInt("timeouts"),

	CacheHits:   expvar.NewInt("cache_hits"),
	CacheMisses: expvar.NewInt("cache_misses"),
}

Metrics contains grouped expvars for /debug/vars and graphite

Functions

This section is empty.

Types

type App

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

App represents the main zipper runnable

func New

func New(config cfg.Zipper, logger *zap.Logger, buildVersion string) (*App, error)

New inits backends and makes a new copy of the app. Does not run the app

func (*App) Start

func (app *App) Start()

Start start launches the goroutines starts the app execution

type PrometheusMetrics

type PrometheusMetrics struct {
	Requests     prometheus.Counter
	Responses    *prometheus.CounterVec
	DurationsExp prometheus.Histogram
	DurationsLin prometheus.Histogram
	TimeInQueue  prometheus.Histogram
}

PrometheusMetrics keeps all the metrics exposed on /metrics endpoint

func NewPrometheusMetrics

func NewPrometheusMetrics(config cfg.Zipper) *PrometheusMetrics

NewPrometheusMetrics creates a set of default Prom metrics

Jump to

Keyboard shortcuts

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