Documentation ¶
Index ¶
Constants ¶
View Source
const DefaultRequestLimit = 128 * 1024
DefaultRequestLimit is the size limit of a request body coming in
Variables ¶
View Source
var ( ErrRequiredLabelMissing = fmt.Errorf("a required label is missing from the metric") ErrRequiredLabelValueIncorrect = fmt.Errorf("a required label value is incorrect") )
Functions ¶
Types ¶
type ClusterAuthorizer ¶
type ClusterAuthorizer interface {
AuthorizeCluster(token, cluster string) (subject string, err error)
}
ClusterAuthorizer authorizes a cluster by its token and id, returning a subject or error
type Handler ¶
type Handler struct { ForwardURL string // contains filtered or unexported fields }
Handler knows the forwardURL for all requests
func NewHandler ¶
func NewHandler(logger log.Logger, forwardURL string, client *http.Client, reg prometheus.Registerer, tenantID string, whitelistRules []string, elideLabels []string, requiredLabelValsFromCtx map[string]interface{}) (*Handler, error)
NewHandler returns a new Handler with a http client
func (*Handler) LimitBodySize ¶
LimitBodySize is a middleware that check that the request body is not bigger than the limit
func (*Handler) Receive ¶
func (h *Handler) Receive(w http.ResponseWriter, r *http.Request)
Receive a remote-write request after it has been authenticated and forward it to Thanos
func (*Handler) TransformAndValidateWriteRequest ¶
Click to show internal directories.
Click to hide internal directories.