Documentation
¶
Overview ¶
Package server contains the kwok server.
Index ¶
- type Config
- type Server
- func (s *Server) AttachContainer(ctx context.Context, podName, podNamespace string, uid types.UID, ...) error
- func (s *Server) ExecInContainer(ctx context.Context, podName, podNamespace string, uid types.UID, ...) error
- func (s *Server) GetContainerLogs(ctx context.Context, podName, podNamespace, container string, ...) error
- func (s *Server) InstallDebuggingDisabledHandlers()
- func (s *Server) InstallDebuggingHandlers()
- func (s *Server) InstallHealthz()
- func (s *Server) InstallMetrics()
- func (s *Server) InstallProfilingHandler(enableProfilingLogHandler bool, enableContentionProfiling bool)
- func (s *Server) PortForward(ctx context.Context, podName, podNamespace string, uid types.UID, port int32, ...) error
- func (s *Server) Run(ctx context.Context, address string, certFile, privateKeyFile string) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶ added in v0.2.0
type Config struct { ClusterPortForwards []*internalversion.ClusterPortForward PortForwards []*internalversion.PortForward ClusterExecs []*internalversion.ClusterExec Execs []*internalversion.Exec ClusterLogs []*internalversion.ClusterLogs Logs []*internalversion.Logs ClusterAttaches []*internalversion.ClusterAttach Attaches []*internalversion.Attach }
Config holds configurations needed by the server handlers.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a server that can serve HTTP/HTTPS requests.
func (*Server) AttachContainer ¶
func (s *Server) AttachContainer(ctx context.Context, podName, podNamespace string, uid types.UID, containerName string, stdin io.Reader, stdout, stderr io.WriteCloser, tty bool, resize <-chan clientremotecommand.TerminalSize) error
AttachContainer attaches to a container in a pod, copying data between in/out/err and the container's stdin/stdout/stderr.
func (*Server) ExecInContainer ¶
func (s *Server) ExecInContainer(ctx context.Context, podName, podNamespace string, uid types.UID, container string, cmd []string, in io.Reader, out, errOut io.WriteCloser, tty bool, resize <-chan clientremotecommand.TerminalSize) error
ExecInContainer executes a command in a container.
func (*Server) GetContainerLogs ¶
func (s *Server) GetContainerLogs(ctx context.Context, podName, podNamespace, container string, logOptions *corev1.PodLogOptions, stdout, stderr io.Writer) error
GetContainerLogs returns logs for a container in a pod. If follow is true, it streams the logs until the connection is closed by the client.
func (*Server) InstallDebuggingDisabledHandlers ¶
func (s *Server) InstallDebuggingDisabledHandlers()
InstallDebuggingDisabledHandlers registers the HTTP request patterns that provide better error message
func (*Server) InstallDebuggingHandlers ¶
func (s *Server) InstallDebuggingHandlers()
InstallDebuggingHandlers registers the HTTP request patterns that provide debugging functionality
func (*Server) InstallHealthz ¶
func (s *Server) InstallHealthz()
InstallHealthz installs the healthz handler.
func (*Server) InstallMetrics ¶
func (s *Server) InstallMetrics()
InstallMetrics registers the metrics handler on the given mux.
func (*Server) InstallProfilingHandler ¶
func (s *Server) InstallProfilingHandler(enableProfilingLogHandler bool, enableContentionProfiling bool)
InstallProfilingHandler registers the HTTP request patterns for /debug/pprof endpoint.
Source Files
¶
Directories
¶
Path | Synopsis |
---|---|
Package portforward contains server-side logic for handling port forwarding requests.
|
Package portforward contains server-side logic for handling port forwarding requests. |
Package remotecommand contains functions related to executing commands in and attaching to pods.
|
Package remotecommand contains functions related to executing commands in and attaching to pods. |