Package com.marcnuri.yakc.api
Interface KubernetesCall<T>
-
- All Superinterfaces:
retrofit2.Call<T>,java.lang.Cloneable
- All Known Subinterfaces:
KubernetesExecCall<T>,KubernetesListCall<T,W>
public interface KubernetesCall<T> extends retrofit2.Call<T>RetrofitCallextension specific for calls performed using theKubernetesClient.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description okhttp3.ResponseexecuteRaw()Synchronously send the request and return an unprocessedResponsewith no IO operations performed to theResponse.body().Tget()Synchronously send the request and return its decoded response body.<O> Oget(java.lang.Class<O> returnType)Kubernetes OpenAPI spec has some issues, and for some resources, the documented return type doesn't match with the response object provided by the server.
-
-
-
Method Detail
-
get
T get() throws java.io.IOException
Synchronously send the request and return its decoded response body.- Throws:
java.io.IOException- if a problem occurred talking to the server.
-
get
<O> O get(java.lang.Class<O> returnType) throws java.io.IOException
Kubernetes OpenAPI spec has some issues, and for some resources, the documented return type doesn't match with the response object provided by the server.e.g. DELETE /api/v1/namespaces/{namespace}/pods/{name} returns Pod instead of Status
This method should be used when the regular
get()fails due to a conversion problem because the response type doesn't match the one provided in the API.- Type Parameters:
O- type parameter for the instance object to be returned.- Parameters:
returnType- Class of the expected return type.- Returns:
- an instance of the type being retrieved.
- Throws:
java.io.IOException- if a problem occurred talking to the server.- See Also:
- https://github.com/kubernetes/kubernetes/issues/59501, https://github.com/kubernetes-client/csharp/issues/145, https://github.com/kubernetes-client/csharp/issues/44, https://github.com/kubernetes-client/csharp/pull/46
-
executeRaw
okhttp3.Response executeRaw() throws java.io.IOExceptionSynchronously send the request and return an unprocessedResponsewith no IO operations performed to theResponse.body().To avoid leaking resources callers should close the Response which in turn will close the underlying ResponseBody.
- Returns:
- a raw Response ready to be processed.
- Throws:
java.io.IOException- if a problem occurred talking to the server.
-
-