Module Kube.Port_forwardSource

Kubernetes Pod port forwarding over the WebSocket SPDY tunnel.

Sourcetype t
Sourcetype stream
Sourcetype error =
  1. | Client_error of Client.error
  2. | Protocol_error of string
  3. | Io_error of string
Sourceval pp_error : Format.formatter -> error -> unit
Sourceval connect : ?cancel:Cancel.t -> ?namespace:string -> ?ports:int list -> ?max_stream_buffer_bytes:int -> Client.t -> pod:string -> unit -> (t, error) result

Open one multiplexed port-forward connection. ports is sent as repeated query parameters and should contain the remote ports that will be opened. Current Kubernetes API servers require the SPDY/3.1+portforward.k8s.io WebSocket subprotocol.

Sourceval open_stream : ?timeout:float -> t -> port:int -> (stream, error) result

Open the error/data stream pair for one connection to port.

Sourceval read : stream -> bytes -> int -> int -> (int, error) result
Sourceval write : stream -> string -> (unit, error) result
Sourceval close_write : stream -> (unit, error) result

Half-close the data stream after all local input has been sent.

Sourceval close_stream : stream -> unit

Abort both streams. Idempotent.

Sourceval close : t -> unit

Close the multiplexed connection and all of its streams. Idempotent.

Sourcemodule Forwarder : sig ... end
Sourcemodule For_testing : sig ... end