api

package
v0.7.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 17, 2018 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PodExecHandlerFunc

func PodExecHandlerFunc(backend remotecommand.Executor) 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, tail int) (string, error)
}

ContainerLogsBackend is used in place of backend implementations for getting container logs

type PodMetricsBackend

type PodMetricsBackend interface {
	GetStatsSummary(context.Context) (*stats.Summary, error)
}

PodMetricsBackend is used in place of backend implementations to get k8s pod metrics.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL