metrics

package
v3.7.14-1+incompatible Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2017 License: Apache-2.0 Imports: 8 Imported by: 0

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

View Source
var (
	RegistryAPIRequests *prometheus.SummaryVec
)

Functions

func Dispatcher

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

Dispatcher handles the GET requests for metrics endpoint.

func NewTimer

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

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

func Register

func Register()

Register the metrics.

Types

type BlobStore

type BlobStore struct {
	Store    distribution.BlobStore
	Reponame string
}

BlobStore wraps a distribution.BlobStore to collect statistics

func (*BlobStore) Create

func (*BlobStore) Delete

func (b *BlobStore) Delete(ctx context.Context, dgst digest.Digest) error

func (*BlobStore) Get

func (b *BlobStore) Get(ctx context.Context, dgst digest.Digest) ([]byte, error)

func (*BlobStore) Open

func (*BlobStore) Put

func (b *BlobStore) Put(ctx context.Context, mediaType string, p []byte) (distribution.Descriptor, error)

func (*BlobStore) Resume

func (*BlobStore) ServeBlob

func (b *BlobStore) ServeBlob(ctx context.Context, w http.ResponseWriter, req *http.Request, dgst digest.Digest) error

func (*BlobStore) Stat

type ManifestService

type ManifestService struct {
	Manifests distribution.ManifestService
	Reponame  string
}

ManifestService wraps a distribution.ManifestService to collect statistics

func (*ManifestService) Delete

func (m *ManifestService) Delete(ctx context.Context, dgst digest.Digest) error

func (*ManifestService) Exists

func (m *ManifestService) Exists(ctx context.Context, dgst digest.Digest) (bool, error)

func (*ManifestService) Get

func (*ManifestService) Put

type TagService

type TagService struct {
	Tags     distribution.TagService
	Reponame string
}

TagService wraps a distribution.TagService to collect statistics

func (*TagService) All

func (t *TagService) All(ctx context.Context) ([]string, error)

func (*TagService) Get

func (*TagService) Lookup

func (t *TagService) Lookup(ctx context.Context, digest distribution.Descriptor) ([]string, error)

func (*TagService) Tag

func (t *TagService) Tag(ctx context.Context, tag string, desc distribution.Descriptor) error

func (*TagService) Untag

func (t *TagService) Untag(ctx context.Context, tag string) error

Jump to

Keyboard shortcuts

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