pub enum Scaling {
AutomaticScaling(AutomaticScaling),
BasicScaling(BasicScaling),
ManualScaling(ManualScaling),
}
Expand description
Controls how instances are created, scaled, and reaped.
Defaults to AutomaticScaling
.
Variants§
AutomaticScaling(AutomaticScaling)
Automatic scaling is based on request rate, response latencies, and other application metrics. Instances are dynamically created and destroyed as needed in order to handle traffic.
BasicScaling(BasicScaling)
A service with basic scaling will create an instance when the application receives a request. The instance will be turned down when the app becomes idle. Basic scaling is ideal for work that is intermittent or driven by user activity.
ManualScaling(ManualScaling)
A service with manual scaling runs continuously, allowing you to perform complex initialization and rely on the state of its memory over time. Manually scaled versions are sometimes referred to as “backends”.
Implementations§
source§impl Scaling
impl Scaling
sourcepub fn merge(
field: &mut Option<Scaling>,
tag: u32,
wire_type: WireType,
buf: &mut impl Buf,
ctx: DecodeContext,
) -> Result<(), DecodeError>
pub fn merge( field: &mut Option<Scaling>, tag: u32, wire_type: WireType, buf: &mut impl Buf, ctx: DecodeContext, ) -> Result<(), DecodeError>
Decodes an instance of the message from a buffer, and merges it into self.
sourcepub fn encoded_len(&self) -> usize
pub fn encoded_len(&self) -> usize
Returns the encoded length of the message without a length delimiter.
Trait Implementations§
source§impl PartialEq for Scaling
impl PartialEq for Scaling
impl Copy for Scaling
impl StructuralPartialEq for Scaling
Auto Trait Implementations§
impl Freeze for Scaling
impl RefUnwindSafe for Scaling
impl Send for Scaling
impl Sync for Scaling
impl Unpin for Scaling
impl UnwindSafe for Scaling
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request