Documentation ¶
Overview ¶
Package api implements HTTP handlers for handling requests that the kubelet would normally implement, such as pod logs, exec, etc.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PodExecHandlerFunc ¶
func PodExecHandlerFunc(backend ExecBackend) http.HandlerFunc
PodExecHandlerFunc makes an http handler func from a Provider which execs a command in a pod's container Note that this handler currently depends on gorrilla/mux to get url parts as variables. TODO(@cpuguy83): don't force gorilla/mux on consumers of this function
func PodLogsHandlerFunc ¶
func PodLogsHandlerFunc(p ContainerLogsBackend) http.HandlerFunc
PodLogsHandlerFunc creates an http handler function from a provider to serve logs from a pod
func PodMetricsHandlerFunc ¶
func PodMetricsHandlerFunc(b PodMetricsBackend) http.HandlerFunc
PodMetricsHandlerFunc makes an HTTP handler for implementing the kubelet summary stats endpoint
Types ¶
type ContainerLogsBackend ¶
type ContainerLogsBackend interface {
GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts providers.ContainerLogOpts) (io.ReadCloser, error)
}
ContainerLogsBackend is used in place of backend implementations for getting container logs