Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type HookHandler ¶
type HookHandler interface {
ServeHTTP(w http.ResponseWriter, r *http.Request, ctx apirequest.Context, name, subpath string) error
}
HookHandler is a Kubernetes API compatible webhook that is able to get access to the raw request and response. Used when adapting existing webhook code to the Kubernetes patterns.
type WebHook ¶
type WebHook struct {
// contains filtered or unexported fields
}
WebHook provides a reusable rest.Storage implementation for linking a generic WebHook handler into the Kube API pattern. It is intended to be used with GET or POST against a resource's named path, possibly as a subresource. The handler has access to the extracted information from the Kube apiserver including the context, the name, and the subpath.
func NewHTTPWebHook ¶
NewHTTPWebHook creates an adapter that implements rest.Connector for the given http.Handler.
func NewWebHook ¶
func NewWebHook(handler HookHandler, allowGet bool) *WebHook
NewWebHook creates an adapter that implements rest.Connector for the given HookHandler.
func (*WebHook) Connect ¶
func (h *WebHook) Connect(ctx apirequest.Context, name string, options runtime.Object, responder rest.Responder) (http.Handler, error)
Connect responds to connections with a ConnectHandler
func (*WebHook) ConnectMethods ¶
ConnectMethods returns the supported web hook types.
type WebHookHandler ¶
type WebHookHandler struct {
// contains filtered or unexported fields
}
WebHookHandler responds to web hook requests from the master.
func (*WebHookHandler) ServeHTTP ¶
func (h *WebHookHandler) ServeHTTP(w http.ResponseWriter, r *http.Request)