Documentation ¶
Overview ¶
Package metrics provides functions to collect runtime registry statistics and expose the registered metrics via HTTP.
Index ¶
- Variables
- func Dispatcher(ctx *handlers.Context, r *http.Request) http.Handler
- func NewTimer(collector *prometheus.SummaryVec, labels []string) *metricTimer
- func Register()
- type BlobStore
- func (b *BlobStore) Create(ctx context.Context, options ...distribution.BlobCreateOption) (distribution.BlobWriter, error)
- func (b *BlobStore) Delete(ctx context.Context, dgst digest.Digest) error
- func (b *BlobStore) Get(ctx context.Context, dgst digest.Digest) ([]byte, error)
- func (b *BlobStore) Open(ctx context.Context, dgst digest.Digest) (distribution.ReadSeekCloser, error)
- func (b *BlobStore) Put(ctx context.Context, mediaType string, p []byte) (distribution.Descriptor, error)
- func (b *BlobStore) Resume(ctx context.Context, id string) (distribution.BlobWriter, error)
- func (b *BlobStore) ServeBlob(ctx context.Context, w http.ResponseWriter, req *http.Request, ...) error
- func (b *BlobStore) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error)
- type ManifestService
- func (m *ManifestService) Delete(ctx context.Context, dgst digest.Digest) error
- func (m *ManifestService) Exists(ctx context.Context, dgst digest.Digest) (bool, error)
- func (m *ManifestService) Get(ctx context.Context, dgst digest.Digest, ...) (distribution.Manifest, error)
- func (m *ManifestService) Put(ctx context.Context, manifest distribution.Manifest, ...) (digest.Digest, error)
- type TagService
- func (t *TagService) All(ctx context.Context) ([]string, error)
- func (t *TagService) Get(ctx context.Context, tag string) (distribution.Descriptor, error)
- func (t *TagService) Lookup(ctx context.Context, digest distribution.Descriptor) ([]string, error)
- func (t *TagService) Tag(ctx context.Context, tag string, desc distribution.Descriptor) error
- func (t *TagService) Untag(ctx context.Context, tag string) error
Constants ¶
This section is empty.
Variables ¶
View Source
var (
RegistryAPIRequests *prometheus.SummaryVec
)
Functions ¶
func Dispatcher ¶
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.
Types ¶
type BlobStore ¶
type BlobStore struct { Store distribution.BlobStore Reponame string }
BlobStore wraps a distribution.BlobStore to collect statistics
func (*BlobStore) Create ¶
func (b *BlobStore) Create(ctx context.Context, options ...distribution.BlobCreateOption) (distribution.BlobWriter, error)
func (*BlobStore) Open ¶
func (b *BlobStore) Open(ctx context.Context, dgst digest.Digest) (distribution.ReadSeekCloser, error)
func (*BlobStore) Put ¶
func (b *BlobStore) Put(ctx context.Context, mediaType string, p []byte) (distribution.Descriptor, error)
func (*BlobStore) Resume ¶
func (b *BlobStore) Resume(ctx context.Context, id string) (distribution.BlobWriter, error)
func (*BlobStore) Stat ¶
func (b *BlobStore) Stat(ctx context.Context, dgst digest.Digest) (distribution.Descriptor, error)
type ManifestService ¶
type ManifestService struct { Manifests distribution.ManifestService Reponame string }
ManifestService wraps a distribution.ManifestService to collect statistics
func (*ManifestService) Get ¶
func (m *ManifestService) Get(ctx context.Context, dgst digest.Digest, options ...distribution.ManifestServiceOption) (distribution.Manifest, error)
func (*ManifestService) Put ¶
func (m *ManifestService) Put(ctx context.Context, manifest distribution.Manifest, options ...distribution.ManifestServiceOption) (digest.Digest, error)
type TagService ¶
type TagService struct { Tags distribution.TagService Reponame string }
TagService wraps a distribution.TagService to collect statistics
func (*TagService) Get ¶
func (t *TagService) Get(ctx context.Context, tag string) (distribution.Descriptor, error)
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
Click to show internal directories.
Click to hide internal directories.