Struct krew_wasm_plugin_sdk::kube_config::ConnectionConfig
source · [−]pub struct ConnectionConfig {
pub identity: UserIdentity,
pub server: Server,
}
Expand description
Connection details for a Kubernetes API server. Includes details about the server and the user identity to be used.
Fields
identity: UserIdentity
server: Server
Implementations
sourceimpl ConnectionConfig
impl ConnectionConfig
sourcepub fn from_kube_config() -> Result<ConnectionConfig>
pub fn from_kube_config() -> Result<ConnectionConfig>
Create a ConnectionConfig
by parsing the contents of the default
kubeconfig file
sourcepub fn register<'a>(&'a self) -> Result<String>
pub fn register<'a>(&'a self) -> Result<String>
Connecting against a Kubernetes API server requires some tuning for the
WASI http guest library. This includes operations like: adding extra
trusted root CA, handling the user identity.
This can be done with the wasi_outbound_http::register_request_config
function, but this method is a convenient wrapper around it.
The method returns the ID that identifies this specific connection configuration. The method can be called as many times as wanted, but it will always return a new ID. Because of that, it’s recommended to call the method only once and store the ID in a safe place.
Auto Trait Implementations
impl RefUnwindSafe for ConnectionConfig
impl Send for ConnectionConfig
impl Sync for ConnectionConfig
impl Unpin for ConnectionConfig
impl UnwindSafe for ConnectionConfig
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more