Skip to content

Commit

Permalink
Make raw Client::send method public (#972)
Browse files Browse the repository at this point in the history
chore(kube-client): make raw send method public

This makes the send method public, which can be used to communicate directly with the API server.
This can be used to create a proxy server or application-level gateway between localhost and the
 Kubernetes API server.

Signed-off-by: Tiago Castro <[email protected]>
  • Loading branch information
tiagolobocastro authored Aug 3, 2022
1 parent 79f1d7a commit fb695bc
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion kube-client/src/client/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ impl Client {
&self.default_ns
}

async fn send(&self, request: Request<Body>) -> Result<Response<Body>> {
/// Perform a raw HTTP request against the API and return the raw response back.
/// This method can be used to get raw access to the API which may be used to, for example,
/// create a proxy server or application-level gateway between localhost and the API server.
pub async fn send(&self, request: Request<Body>) -> Result<Response<Body>> {
let mut svc = self.inner.clone();
let res = svc
.ready()
Expand Down

0 comments on commit fb695bc

Please sign in to comment.