Skip to main content

Module channel

Module channel 

Source
Expand description

The channel framing of the Kubernetes WebSocket protocols, which exec, attach and port forwarding share: every message starts with its channel, base64 protocols send text messages with the channel as an ASCII digit offset and the payload base64 encoded.

Staticsยง

BASE64_LENIENT ๐Ÿ”’
Decodes the base64 payloads of clients like base64.StdEncoding of Go, which the reference implementation of the protocols uses: line breaks get ignored and the bits of the last symbol which are no data may be set. Clients which wrap their base64 or encode it less strictly work with the kubelet, so they have to work here.

Functionsยง

decode ๐Ÿ”’
The channel and the payload of a message of the client, none for an empty one or invalid base64. Binary payloads do not get copied.
message ๐Ÿ”’
A message of the server on a channel.