Documentation ¶
Index ¶
- func NewRequestForProxy(location *url.URL, req *http.Request) (*http.Request, context.CancelFunc)
- func NewTranslatingHandler(delegate http.Handler, translator http.Handler, ...) http.Handler
- func ResolveCluster(services listersv1.ServiceLister, namespace, id string, port int32) (*url.URL, error)
- func ResolveEndpoint(services listersv1.ServiceLister, endpoints listersv1.EndpointsLister, ...) (*url.URL, error)
- type Options
- type StreamTranslatorHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewRequestForProxy ¶ added in v0.28.0
NewRequestForProxy returns a shallow copy of the original request with a context that may include a timeout for discovery requests
func NewTranslatingHandler ¶ added in v0.29.0
func ResolveCluster ¶
func ResolveEndpoint ¶
func ResolveEndpoint(services listersv1.ServiceLister, endpoints listersv1.EndpointsLister, namespace, id string, port int32) (*url.URL, error)
ResolveEndpoint returns a URL to which one can send traffic for the specified service.
Types ¶
type Options ¶ added in v0.29.0
Options contains details about which streams are required for remote command execution.
type StreamTranslatorHandler ¶ added in v0.29.0
type StreamTranslatorHandler struct { // Location is the location of the upstream proxy. It is used as the location to Dial on the upstream server // for upgrade requests. Location *url.URL // Transport provides an optional round tripper to use to proxy. If nil, the default proxy transport is used Transport http.RoundTripper // MaxBytesPerSec throttles stream Reader/Writer if necessary MaxBytesPerSec int64 // Options define the requested streams (e.g. stdin, stdout). Options Options }
StreamTranslatorHandler is a handler which translates WebSocket stream data to SPDY to proxy to kubelet (and ContainerRuntime).
func NewStreamTranslatorHandler ¶ added in v0.29.0
func NewStreamTranslatorHandler(location *url.URL, transport http.RoundTripper, maxBytesPerSec int64, opts Options) *StreamTranslatorHandler
NewStreamTranslatorHandler creates a new proxy handler. Responder is required for returning errors to the caller.
func (*StreamTranslatorHandler) ServeHTTP ¶ added in v0.29.0
func (h *StreamTranslatorHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)
Click to show internal directories.
Click to hide internal directories.