apiserverk8s.io/apiserver/pkg/util/notfoundhandler Index | Files

package notfoundhandler

import "k8s.io/apiserver/pkg/util/notfoundhandler"

Index

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func New

func New(serializer runtime.NegotiatedSerializer, isMuxAndDiscoveryCompleteFn func(ctx context.Context) bool) *Handler

New returns an HTTP handler that is meant to be executed at the end of the delegation chain. It checks if the request have been made before the server has installed all known HTTP paths. In that case it returns a 503 response otherwise it returns a 404.

Note that we don't want to add additional checks to the readyz path as it might prevent fixing bricked clusters. This specific handler is meant to "protect" requests that arrive before the paths and handlers are fully initialized.

func (*Handler) ServeHTTP

func (h *Handler) ServeHTTP(rw http.ResponseWriter, req *http.Request)

Source Files

not_found_handler.go

Version
v0.33.0 (latest)
Published
Apr 23, 2025
Platform
linux/amd64
Imports
8 packages
Last checked
1 hour ago

Tools for package owners.