Skip to main content

Module session

Module session 

Source
Expand description

What exec and attach sessions share: the connection to the client, its input and the final status.

Modulesยง

pending_stdin ๐Ÿ”’
The stdin of a client which waits for the container, see PendingStdin.

Structsยง

ClientRx ๐Ÿ”’
What the input of a client hands to the loop of its session.
ResizeEvent ๐Ÿ”’
Terminal resize event for exec and attach. Kubernetes decodes it with Go, which matches the names of the fields regardless of their case, so clients send {"width":80} as well as {"Width":80}, and leaves a missing or null field at zero, and a null event all zero. For Width and Height, ASCII case folding accepts the same names as the Unicode case folding of Go, which only adds the Kelvin sign for k and the long s for s.
SessionInput ๐Ÿ”’
Forwards the stdin and the resize events of a client to the process, for the loops of exec and attach sessions, which forward the output meanwhile.

Enumsยง

EventEnd ๐Ÿ”’
How a single event of a client ended its input, see StreamingServer::read_event.
InputEnd ๐Ÿ”’
How the input of a client ended.
InputEvent ๐Ÿ”’
What the loop of a session has to handle.

Constantsยง

PENDING_STDIN_MAX_BYTES ๐Ÿ”’
How much stdin the read task holds while the container does not take it, on top of the stdin channel. The socket is still read meanwhile, so that resize events and the close do not wait behind it. The message which fills it comes on top, also when it is larger than all of it.
PING_INTERVAL ๐Ÿ”’
How often a session pings the client, to notice a client which went away also while its stdin waits for the container. A WebSocket session pings only while stdin waits, a SPDY connection all the time.
STDIN_FLUSH_TIMEOUT ๐Ÿ”’
How long the stdin which the client sent right before closing may wait for the container to take a part of it, see ClientRx::stdin_taken. A slow container gets all of it, only one which stopped reading its stdin holds up the end of the session this long.
STDIN_QUEUE_SIZE ๐Ÿ”’
How many entries of stdin wait for the session loop. Each is at most STDIN_CHUNK_SIZE, more of them would only hold more stdin which the container did not take.

Type Aliasesยง

ResizeRx ๐Ÿ”’
The latest resize event of a client, older ones are replaced.