Skip to main content
Module

x/kubernetes_apis/common.ts>KubernetesTunnel

REST focused Typescript classes for Kubernetes APIs, and tools for generating API interfaces
Latest
interface KubernetesTunnel
import { type KubernetesTunnel } from "https://deno.land/x/kubernetes_apis@v0.5.0/common.ts";

Properties

readonly
transportProtocol: "SPDY" | "WebSocket" | "Opaque"

Indicates which network protocol is in use. This changes semantics, largely due to Kubernetes tunnel API quirks.

readonly
subProtocol: string

Methods

getChannel<Treadable extends boolean, Twritable extends boolean>(opts: { spdyHeaders?: Record<string, string | number>; streamIndex?: number; readable: Treadable; writable: Twritable; }): Promise<{ readable: Treadable extends true ? ReadableStream<Uint8Array> : null; writable: Twritable extends true ? WritableStream<Uint8Array> : null; }>

Set up a channel, using either SPDY or Websocket semantics.

ready(): Promise<void>

Call once after creating the initial channels.

stop(): Promise<void>

Disconnects the underlying transport.