metrics

package
v3.9.0-alpha.1+incompa... Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2017 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Overview

Package metrics provides functions to collect runtime registry statistics and expose the registered metrics via HTTP.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Dispatcher

func Dispatcher(ctx *handlers.Context, r *http.Request) http.Handler

Dispatcher handles the GET requests for metrics endpoint.

func NewBlobStore

func NewBlobStore(bs distribution.BlobStore, reponame string) distribution.BlobStore

NewBlobStore wraps a distribution.BlobStore to collect statistics.

func NewManifestService

func NewManifestService(ms distribution.ManifestService, reponame string) distribution.ManifestService

NewManifestService wraps a distribution.ManifestService to collect statistics

func NewTagService

func NewTagService(ts distribution.TagService, reponame string) distribution.TagService

NewTagService wraps a distribution.TagService to collect statistics

func Register

func Register()

Register the metrics.

Types

type Timer

type Timer interface {
	// Stop records the duration passed since the Timer was created with NewTimer.
	Stop()
}

Timer is a helper type to time functions.

func NewTimer

func NewTimer(collector *prometheus.SummaryVec, labels []string) Timer

NewTimer wraps the SummaryVec and used to track amount of time passed since the Timer was created.

Jump to

Keyboard shortcuts

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