handlers

package
v1.9.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2023 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HttpError added in v1.9.0

func HttpError(ctx context.Context, writer http.ResponseWriter, request *http.Request, logger logr.Logger, err error, code int)

func Probe

func Probe(check func() bool) http.HandlerFunc

func Verify

func Verify(ctx context.Context, logger logr.Logger, request *admissionv1.AdmissionRequest, startTime time.Time) *admissionv1.AdmissionResponse

Types

type AdmissionHandler

func FromAdmissionFunc added in v1.9.0

func FromAdmissionFunc(name string, h AdmissionHandler) AdmissionHandler

func (AdmissionHandler) WithAdmission added in v1.8.2

func (inner AdmissionHandler) WithAdmission(logger logr.Logger) HttpHandler

func (AdmissionHandler) WithDump added in v1.9.0

func (AdmissionHandler) WithFilter added in v1.8.2

func (inner AdmissionHandler) WithFilter(configuration config.Configuration) AdmissionHandler

func (AdmissionHandler) WithMetrics added in v1.8.2

func (inner AdmissionHandler) WithMetrics(logger logr.Logger, metricsConfig config.MetricsConfiguration, attrs ...attribute.KeyValue) AdmissionHandler

func (AdmissionHandler) WithOperationFilter added in v1.9.0

func (inner AdmissionHandler) WithOperationFilter(operations ...admissionv1.Operation) AdmissionHandler

func (AdmissionHandler) WithProtection added in v1.8.2

func (inner AdmissionHandler) WithProtection(enabled bool) AdmissionHandler

func (AdmissionHandler) WithSubResourceFilter added in v1.9.0

func (inner AdmissionHandler) WithSubResourceFilter(subresources ...string) AdmissionHandler

func (AdmissionHandler) WithTrace added in v1.9.0

func (inner AdmissionHandler) WithTrace(name string) AdmissionHandler

type HttpHandler added in v1.9.0

type HttpHandler func(http.ResponseWriter, *http.Request)

func (HttpHandler) ToHandlerFunc added in v1.9.0

func (h HttpHandler) ToHandlerFunc() http.HandlerFunc

func (HttpHandler) WithMetrics added in v1.9.0

func (inner HttpHandler) WithMetrics(logger logr.Logger, attrs ...attribute.KeyValue) HttpHandler

func (HttpHandler) WithTrace added in v1.9.0

func (inner HttpHandler) WithTrace(name string) HttpHandler

Jump to

Keyboard shortcuts

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