http

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2023 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultKubeletAddr = ":10250"
)

Variables

AcceptedCiphers is the list of accepted TLS ciphers, with known weak ciphers elided Note this list should be a moving target.

Functions

func SetupHTTPServer

func SetupHTTPServer(ctx context.Context, p Provider, certPEMBlock, keyPEMBlock []byte) (_ func(), retErr error)

Types

type LogsExecProvider

type LogsExecProvider struct {
	SourceClient  kubernetes.Interface
	TargetConfigs map[string]*rest.Config
	TargetClients map[string]kubernetes.Interface
}

func (*LogsExecProvider) GetContainerLogs

func (p *LogsExecProvider) GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error)

GetContainerLogs retrieves the logs of a container by name from the provider.

func (*LogsExecProvider) RunInContainer

func (p *LogsExecProvider) RunInContainer(ctx context.Context, namespace, name, container string, cmd []string, attach api.AttachIO) error

RunInContainer executes a command in a container in the pod, copying data between in/out/err and the container's stdin/stdout/stderr.

type Provider

type Provider interface {
	RunInContainer(ctx context.Context, namespace, podName, containerName string, cmd []string, attach api.AttachIO) error
	GetContainerLogs(ctx context.Context, namespace, podName, containerName string, opts api.ContainerLogOpts) (io.ReadCloser, error)
}

Jump to

Keyboard shortcuts

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