Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/kubernetes_client/tunnel-beta/via-websocket.ts>WebsocketTunnel

Typescript library for accessing a Kubernetes API server
Latest
class WebsocketTunnel
implements KubernetesTunnel
import { WebsocketTunnel } from "https://deno.land/x/kubernetes_client@v0.7.2/tunnel-beta/via-websocket.ts";

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>>
private
upstreamChannels
readonly
done: Promise<void>
readonly
subProtocol: string
readonly
transportProtocol: string

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>