router

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2021 License: Apache-2.0 Imports: 15 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(handler func(*AdmissionService))

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 *whv1beta1.ValidatingWebhookConfiguration
	MutatingConfig   *whv1beta1.MutatingWebhookConfiguration

	Config *AdmissionServiceConfig
}

type AdmissionServiceConfig

type AdmissionServiceConfig struct {
	SchedulerName string
	KubeClient    kubernetes.Interface
	VolcanoClient versioned.Interface
	Recorder      record.EventRecorder
}

type AdmitFunc

The AdmitFunc returns response.

Jump to

Keyboard shortcuts

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