router

package
v0.4.1-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2020 License: Apache-2.0 Imports: 13 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 http.ResponseWriter, 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
}

type AdmitFunc

The AdmitFunc returns response

Jump to

Keyboard shortcuts

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