Documentation
¶
Overview ¶
Package http implements an admission webhook handler.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( RequestCount = prometheus.NewCounterVec( prometheus.CounterOpts{ Name: "http_requests_total", Help: "Count of all HTTP requests processed, labeled by route, method and status code.", }, []string{"route", "method", "status_code"}, ) RequestDuration = prometheus.NewHistogramVec( prometheus.HistogramOpts{ Name: "http_request_duration_seconds", Help: "Histogram of request durations, labeled by route, method and status code.", Buckets: prometheus.DefBuckets, }, []string{"route", "method", "status_code"}, ) )
Define your Prometheus metrics
Functions ¶
func NewServer ¶
func NewServer(cfg *config.Settings, routes []RouteSegment, admissionRoutes ...AdmissionRouteSegment) *http.Server
NewServer creates and return a http.Server
Types ¶
type AdmissionRouteSegment ¶
type RouteSegment ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package handler admission webhook handlers (hook.Handler) for various resource types.
|
Package handler admission webhook handlers (hook.Handler) for various resource types. |
|
Package hook contains structures and interfaces for implementing admission webhooks handlers.
|
Package hook contains structures and interfaces for implementing admission webhooks handlers. |
Click to show internal directories.
Click to hide internal directories.