overrides

package
v1.21.0-rc.0 Latest Latest
Warning

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

Go to latest
Published: Mar 13, 2026 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Error messages
	ErrInvalidJSON  = "invalid JSON"
	ErrUserNotFound = "user not found"

	// Runtime config errors
	ErrRuntimeConfig = "runtime config read error"
)
View Source
const (
	ErrInvalidOverridesConfiguration = "invalid overrides configuration"
	ErrFailedToCreateBucketClient    = "failed to create bucket client for overrides"
)
View Source
const (
	// Error messages
	ErrInvalidLimits = "the following limits cannot be modified via the overrides API"
)

Variables

This section is empty.

Functions

func ValidateOverrides

func ValidateOverrides(overrides map[string]any, allowedLimits []string) error

ValidateOverrides checks if the provided overrides only contain allowed limits

Types

type API

type API struct {
	services.Service
	// contains filtered or unexported fields
}

func New

func New(cfg runtimeconfig.Config, logger log.Logger, registerer prometheus.Registerer) (*API, error)

func (*API) DeleteOverrides

func (a *API) DeleteOverrides(w http.ResponseWriter, r *http.Request)

DeleteOverrides removes tenant-specific overrides

func (*API) GetOverrides

func (a *API) GetOverrides(w http.ResponseWriter, r *http.Request)

GetOverrides retrieves overrides for a specific tenant

func (*API) SetOverrides

func (a *API) SetOverrides(w http.ResponseWriter, r *http.Request)

SetOverrides updates overrides for a specific tenant

Jump to

Keyboard shortcuts

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