proxy

package
v1.2.3-fred.5 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// The SPDY subprotocol "v4.channel.k8s.io" is used for remote command
	// attachment/execution. It is the 4th version of the subprotocol and
	// adds support for exit codes.
	StreamProtocolV4Name = "v4.channel.k8s.io"

	// DefaultStreamCreationTimeout
	DefaultStreamCreationTimeout = 30 * time.Second

	IdleTimeout = 15 * time.Minute
	// Name of header that specifies stream type
	StreamType = "streamType"
	// Value for streamType header for stdin stream
	StreamTypeStdin = "stdin"
	// Value for streamType header for stdout stream
	StreamTypeStdout = "stdout"
	// Value for streamType header for stderr stream
	StreamTypeStderr = "stderr"
	// Value for streamType header for data stream
	StreamTypeData = "data"
	// Value for streamType header for error stream
	StreamTypeError = "error"
	// Value for streamType header for terminal resize stream
	StreamTypeResize = "resize"

	// CloseStreamMessage is an expected keyword if stdin is enable and the
	// underlying protocol does not support half closed streams.
	// It is only required for websockets.
	CloseStreamMessage = "\r\nexit_message\r\n"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type KubeMockServer

type KubeMockServer struct {
	TLS  *tls.Config
	Addr net.Addr
	URL  string
	CA   []byte
	// contains filtered or unexported fields
}

func NewKubeAPIMock

func NewKubeAPIMock() (*KubeMockServer, error)

NewKubeAPIMock creates Kubernetes API server for handling exec calls. For now it just supports exec via SPDY protocol and returns the following content into the available streams: {containerName}\n {stdinDump} The output returns the container followed by a dump of the data received from stdin. More endpoints can be configured TODO(tigrato): add support for other endpoints

func (*KubeMockServer) Close

func (s *KubeMockServer) Close() error

Jump to

Keyboard shortcuts

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