Struct kube_client::client::ClientBuilder
source · pub struct ClientBuilder<Svc> { /* private fields */ }
Available on crate feature
client
only.Implementations§
source§impl<Svc> ClientBuilder<Svc>
impl<Svc> ClientBuilder<Svc>
sourcepub fn new(service: Svc, default_namespace: impl Into<String>) -> Selfwhere
Svc: Service<Request<Body>>,
pub fn new(service: Svc, default_namespace: impl Into<String>) -> Selfwhere
Svc: Service<Request<Body>>,
Construct a ClientBuilder
from scratch with a fully custom [Service
] stack.
This method is only intended for advanced use cases, most users will want to use ClientBuilder::try_from
instead,
which provides a default stack as a starting point.
sourcepub fn with_layer<L: Layer<Svc>>(self, layer: &L) -> ClientBuilder<L::Service>
pub fn with_layer<L: Layer<Svc>>(self, layer: &L) -> ClientBuilder<L::Service>
Add a [Layer
] to the current [Service
] stack.