class tunnelBeta.WebsocketTunnel
implements KubernetesTunnel
import { tunnelBeta } from "https://deno.land/x/kubernetes_apis@v0.5.3/deps.ts";
const { WebsocketTunnel } = tunnelBeta;
Handles an individual WebSocket connection to the Kubernetes API. Kubernetes WebSockets support up to 255 indexed bytestreams. To send or receive data, you must first provide the channel's index, and then streams will be returned for that particular index.
WebSocket channels do not support closing individual streams. You must disconnect the overall tunnel if you wish to end things.
Constructors
new
WebsocketTunnel(wss: WebSocketStream, wssConn: WebSocketConnection)Properties
private
downstreamChannels: Map<number, WritableStreamDefaultWriter<Uint8Array>>Methods
getChannel<Treadable extends boolean, Twritable extends boolean>(opts: { spdyHeaders?: Record<string, string | number> | undefined; streamIndex?: number | undefined; readable: Treadable; writable: Twritable; })
ready(): Promise<void>
stop()