mirror of
https://github.com/siderolabs/image-factory.git
synced 2025-09-21 22:01:09 +02:00
Fixes #14 This adds "standard" HTTP metrics for the frontend, and also three kinds of custom metrics: * schematic get/create * system extension popularity score * asset build metrics: cached/not cached, bytes, requests, in dimension of asset kind Signed-off-by: Andrey Smirnov <andrey.smirnov@siderolabs.com>
25 lines
693 B
Go
25 lines
693 B
Go
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
// Package storage implements a storage for schematic data.
|
|
package storage
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/prometheus/client_golang/prometheus"
|
|
)
|
|
|
|
// Storage is the schematic storage.
|
|
type Storage interface {
|
|
prometheus.Collector
|
|
|
|
Head(ctx context.Context, id string) error
|
|
Get(ctx context.Context, id string) ([]byte, error)
|
|
Put(ctx context.Context, id string, data []byte) error
|
|
}
|
|
|
|
// ErrNotFoundTag tags the errors when the schematic is not found.
|
|
type ErrNotFoundTag = struct{}
|