Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InjectDecoderInto ¶
InjectDecoderInto will set decoder on i and return the result if it implements Decoder. Returns false if i does not implement Decoder.
Types ¶
type Decoder ¶
type Decoder struct {
// contains filtered or unexported fields
}
Decoder knows how to decode the contents of an resource interpreter request into a concrete object.
func NewDecoder ¶
NewDecoder creates a Decoder given the runtime.Scheme.
type DecoderInjector ¶
type DecoderInjector interface {
InjectDecoder(*Decoder)
}
DecoderInjector is used by the ControllerManager to inject decoder into webhook handlers.
type Handler ¶
type Handler interface { // Handle yields a response to an ResourceInterpreterRequest. // // The supplied context is extracted from the received http.Request, allowing wrapping // http.Handlers to inject values into and control cancellation of downstream request processing. Handle(context.Context, Request) Response }
Handler can handle an ResourceInterpreterRequest.
type Request ¶
type Request struct {
configv1alpha1.ResourceInterpreterRequest
}
Request defines the input for an interpreter handler. It contains information to identify the object in question (kind, name, namespace), as well as the operation in request(e.g. InterpreterOperationInterpretReplica, InterpreterOperationPrune, etc), and the object itself.
type Response ¶
type Response struct {
configv1alpha1.ResourceInterpreterResponse
}
Response is the output of an interpreter handler.
func PatchResponseFromRaw ¶
PatchResponseFromRaw takes 2 byte arrays and returns a new response with patch.
func Succeeded ¶
Succeeded constructs a response indicating the given operation is handled successfully.
func ValidationResponse ¶
ValidationResponse returns a response for handle a interpret request.