Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCannotApplyResponseTransformers = errors.New("cannot apply response transformers") ErrCannotCreateRESTClient = errors.New("cannot create rest client") ErrCannotGetProxiedResponseBody = errors.New("cannot get response of proxied response body") ErrCannotParseRequestURI = errors.New("cannot parse request URI") ErrCannotTransformResponseBody = errors.New("cannot transform response body") ErrCannotWriteResponseBody = errors.New("cannot write body to the response") ErrContextIsNil = errors.New("context is nil") ErrResponseWriterIsNil = errors.New("response writer is nil") )
Functions ¶
This section is empty.
Types ¶
type HTTP ¶
type HTTP struct {
// contains filtered or unexported fields
}
func NewHTTP ¶
func NewHTTP(restClientFactory kube.RESTClientFactory, responseTransformers []ResponseBodyTransformer) *HTTP
func (*HTTP) DoServeHTTP ¶
DoServeHTTP does the actual job of ServeHTTP, but it returns an error
This method is useful when you want to integrate the handler with a different http server, and it helps to avoid the log.Printf in ServeHTTP, leaving the responsibility of the error handling to the caller.
type JqResponseBodyTransformer ¶
type JqResponseBodyTransformer struct{}
func NewJqResponseBodyTransformer ¶
func NewJqResponseBodyTransformer() *JqResponseBodyTransformer
func (*JqResponseBodyTransformer) Name ¶
func (jq *JqResponseBodyTransformer) Name() string
Click to show internal directories.
Click to hide internal directories.