1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
//! Kubernetes port-forward over SPDY
//!
//! Speaks `SPDY/3.1+portforward.k8s.io` (tunnelled inside WebSocket
//! binary messages) by default, falling back to the legacy `Upgrade:
//! SPDY/3.1` path when the apiserver rejects the WebSocket subprotocol.
//! Multiplexes many concurrent local TCP connections over a small pool of
//! upgraded connections using the SPDY/3.1 frame format.
//!
//! ## Why not `kube::Api::portforward`?
//!
//! `kube::Api::portforward` opens a new WebSocket upgrade for every stream
//! pair, has no keepalive, and gives you opaque errors. This crate
//! multiplexes many stream pairs per upgrade, runs a Ping/Pong watchdog,
//! exposes structured `thiserror` errors, and gracefully falls back to the
//! legacy SPDY/3.1 path when the apiserver is too old for KEP-4006.
//!
//! ## Quick Start
//!
//! ```no_run
//! use kube_portforward::Client;
//! use tokio::io::AsyncWriteExt;
//!
//! # async fn run(kube: kube::Client, url: http::Uri) -> Result<(), Box<dyn std::error::Error>> {
//! let client = Client::new(kube, url);
//! let session = client.session("default", "nginx", 80).open().await?;
//! let mut stream = session.connect().await?;
//! stream.write_all(b"GET / HTTP/1.0\r\n\r\n").await?;
//! session.close().await?;
//! # Ok(()) }
//! ```
pub
pub
pub
pub
pub
pub
pub
pub
pub
pub use ;
pub use Error;
pub use ;
pub use ;
pub use ;
pub use Session;
pub use ;
pub use Subprotocol;