api

package
v0.0.0-...-e41c977 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// BlobBytesPulledCounter is a prometheus.CounterVec.
	BlobBytesPulledCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "keppel_pulled_blob_bytes",
			Help: "Counts blob content bytes that are pulled from Keppel.",
		},
		[]string{"account", "auth_tenant_id", "method"},
	)
	// BlobBytesPushedCounter is a prometheus.CounterVec.
	BlobBytesPushedCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "keppel_pushed_blob_bytes",
			Help: "Counts blob content bytes that are pushed into Keppel.",
		},
		[]string{"account", "auth_tenant_id", "method"},
	)
	// BlobsPulledCounter is a prometheus.CounterVec.
	BlobsPulledCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "keppel_pulled_blobs",
			Help: "Counts blobs that are pulled from Keppel.",
		},
		[]string{"account", "auth_tenant_id", "method"},
	)
	// BlobsPushedCounter is a prometheus.CounterVec.
	BlobsPushedCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "keppel_pushed_blobs",
			Help: "Counts blobs that are pushed into Keppel.",
		},
		[]string{"account", "auth_tenant_id", "method"},
	)
	// ManifestsPulledCounter is a prometheus.CounterVec.
	ManifestsPulledCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "keppel_pulled_manifests",
			Help: "Counts manifests that are pulled from Keppel.",
		},
		[]string{"account", "auth_tenant_id", "method"},
	)
	// ManifestsPushedCounter is a prometheus.CounterVec.
	ManifestsPushedCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "keppel_pushed_manifests",
			Help: "Counts manifests that are pushed into Keppel.",
		},
		[]string{"account", "auth_tenant_id", "method"},
	)
	// UploadsAbortedCounter is a prometheus.CounterVec.
	UploadsAbortedCounter = prometheus.NewCounterVec(
		prometheus.CounterOpts{
			Name: "keppel_aborted_uploads",
			Help: "Counts blob uploads into Keppel that fail and get aborted by Keppel.",
		},
		[]string{"account", "auth_tenant_id", "method"},
	)
)

Functions

func CheckRateLimit

func CheckRateLimit(r *http.Request, rle *keppel.RateLimitEngine, account models.Account, authz *auth.Authorization, action keppel.RateLimitedAction, amount uint64) error

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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