Struct turbolift::kubernetes::K8s [−][src]
pub struct K8s { /* fields omitted */ }
Expand description
K8s
is the interface for turning rust functions into autoscaling microservices
using turbolift. It requires docker and kubernetes / kubectl to already be setup on the
device at runtime.
Access to the kubernetes cluster must be inferrable from the env variables at runtime per kube-rs’s try_default().
Implementations
returns a K8s object. If max is equal to 1, then autoscaling
is not enabled. Otherwise, autoscale is automatically activated
with cluster defaults and a max number of replicas per distributed
function of max
. Panics if max
< 1.
The deploy container function is used for making containers accessible
to the cluster. See K8s::deploy_container
.
Trait Implementations
pub fn declare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
function_name: &'life1 str,
project_tar: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + 'static, Global>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K8s: 'async_trait,
pub fn declare<'life0, 'life1, 'life2, 'async_trait>(
&'life0 mut self,
function_name: &'life1 str,
project_tar: &'life2 [u8]
) -> Pin<Box<dyn Future<Output = Result<(), Box<dyn Error + 'static, Global>>> + Send + 'async_trait, Global>> where
'life0: 'async_trait,
'life1: 'async_trait,
'life2: 'async_trait,
K8s: 'async_trait,
declare a function
Auto Trait Implementations
impl !RefUnwindSafe for K8s
impl !UnwindSafe for K8s
Blanket Implementations
Mutably borrows from an owned value. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
type Output = T
type Output = T
Should always be Self
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more