router

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2024 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

View Source
var APPLICATIONJSON = "application/json"

APPLICATIONJSON json content.

View Source
var CONTENTTYPE = "Content-Type"

CONTENTTYPE http content-type.

Functions

func ForEachAdmission

func ForEachAdmission(config *options.Config, handler func(*AdmissionService) error) error

func RegisterAdmission

func RegisterAdmission(service *AdmissionService) error

func Serve

func Serve(w io.Writer, r *http.Request, admit AdmitFunc)

Serve the http request.

Types

type AdmissionHandler

type AdmissionHandler func(w http.ResponseWriter, r *http.Request)

type AdmissionService

type AdmissionService struct {
	Path    string
	Func    AdmitFunc
	Handler AdmissionHandler

	ValidatingConfig *whv1.ValidatingWebhookConfiguration
	MutatingConfig   *whv1.MutatingWebhookConfiguration

	Config *AdmissionServiceConfig
}

type AdmissionServiceConfig

type AdmissionServiceConfig struct {
	SchedulerNames []string
	KubeClient     kubernetes.Interface
	VolcanoClient  versioned.Interface
	Recorder       record.EventRecorder
	ConfigData     *config.AdmissionConfiguration
}

type AdmitFunc

The AdmitFunc returns response.

Jump to

Keyboard shortcuts

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