Documentation
¶
Overview ¶
Package handlers provides HTTP handlers.
Index ¶
Constants ¶
const ( MaxRequestBodyBytes = int64(6 * 1024 * 1024) DefaultTimeout = 15 * time.Second MinTimeout = 5 * time.Second )
MaxRequestBodyBytes represents the max size of Kubernetes objects we read. Kubernetes allows a 2x buffer on the max etcd size (https://github.com/kubernetes/kubernetes/blob/0afa569499d480df4977568454a50790891860f5/staging/src/k8s.io/apiserver/pkg/server/config.go#L362). We allow an additional 2x buffer, as it is still fairly cheap (6mb) Taken from https://github.com/istio/istio/commit/6ca5055a4db6695ef5504eabdfde3799f2ea91fd
const MaxPayloadSize = 16 * 1024 * 1024
Variables ¶
This section is empty.
Functions ¶
func NewShipperAPI ¶
func NewShipperAPI(base string, d *shipper.MetricShipper) server.API
func NewValidationWebhookAPI ¶
func NewValidationWebhookAPI(base string, controller webhook.WebhookController) server.API
Types ¶
type ProfilingAPI ¶
func NewProfilingAPI ¶
func NewProfilingAPI(base string) *ProfilingAPI
NewProfilingAPI creates a new handler for pprof endpoints
The standard is for this API to live at /debug/pprof
func (*ProfilingAPI) Routes ¶
func (a *ProfilingAPI) Routes() *chi.Mux
type PromMetricsAPI ¶
PromMetricsAPI is a thin wrapper around the Prometheus HTTP handler to integrate with the go-obvious server API.
func NewPromMetricsAPI ¶
func NewPromMetricsAPI(base string) *PromMetricsAPI
func (*PromMetricsAPI) Routes ¶
func (a *PromMetricsAPI) Routes() *chi.Mux
type RemoteWriteAPI ¶
func NewRemoteWriteAPI ¶
func NewRemoteWriteAPI(base string, d *domain.MetricCollector) *RemoteWriteAPI
func (*RemoteWriteAPI) PostMetrics ¶
func (a *RemoteWriteAPI) PostMetrics(w http.ResponseWriter, r *http.Request)
func (*RemoteWriteAPI) Routes ¶
func (a *RemoteWriteAPI) Routes() *chi.Mux
type ShipperAPI ¶
func (*ShipperAPI) Routes ¶
func (a *ShipperAPI) Routes() *chi.Mux
type ValidationWebhookAPI ¶
func (*ValidationWebhookAPI) PostAdmissionRequest ¶
func (a *ValidationWebhookAPI) PostAdmissionRequest(w http.ResponseWriter, r *http.Request)
func (*ValidationWebhookAPI) Register ¶
func (a *ValidationWebhookAPI) Register(app server.Server) error
func (*ValidationWebhookAPI) Routes ¶
func (a *ValidationWebhookAPI) Routes() *chi.Mux