pub struct ModelDeployment {
pub config: DeploymentConfig,
pub status: DeploymentStatus,
pub created_at: SystemTime,
pub updated_at: SystemTime,
pub running_replicas: u32,
pub healthy_replicas: u32,
/* private fields */
}Expand description
Model deployment instance
Fields§
§config: DeploymentConfigDeployment configuration
status: DeploymentStatusCurrent deployment status
created_at: SystemTimeDeployment creation timestamp
updated_at: SystemTimeLast status update timestamp
running_replicas: u32Current number of running instances
healthy_replicas: u32Current number of healthy instances
Implementations§
Source§impl ModelDeployment
impl ModelDeployment
Sourcepub fn new(config: DeploymentConfig) -> Self
pub fn new(config: DeploymentConfig) -> Self
Create a new model deployment
Sourcepub fn update_status(&mut self, status: DeploymentStatus)
pub fn update_status(&mut self, status: DeploymentStatus)
Update deployment status
Sourcepub fn update_replicas(&mut self, running: u32, healthy: u32)
pub fn update_replicas(&mut self, running: u32, healthy: u32)
Update replica counts
Sourcepub fn is_healthy(&self) -> bool
pub fn is_healthy(&self) -> bool
Check if deployment is healthy
Sourcepub fn history(&self) -> &Vec<DeploymentEvent>
pub fn history(&self) -> &Vec<DeploymentEvent>
Get deployment history
Sourcepub fn add_event(&mut self, event_type: DeploymentEventType, message: String)
pub fn add_event(&mut self, event_type: DeploymentEventType, message: String)
Add deployment event
Trait Implementations§
Source§impl Clone for ModelDeployment
impl Clone for ModelDeployment
Source§fn clone(&self) -> ModelDeployment
fn clone(&self) -> ModelDeployment
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ModelDeployment
impl RefUnwindSafe for ModelDeployment
impl Send for ModelDeployment
impl Sync for ModelDeployment
impl Unpin for ModelDeployment
impl UnwindSafe for ModelDeployment
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
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
impl<C, E> EntryToVal<C> for Ewhere
C: Collection<Entry = E>,
Source§type Val = <C as Collection>::Val
type Val = <C as Collection>::Val
The type of values stored in the collection. This might be distinct from
Entry in complex collections.
For example, in a HashMap, while Entry might be a ( key, value ) tuple, Val might only be the value part.Source§fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
fn entry_to_val(self) -> <E as EntryToVal<C>>::Val
Converts an entry into a value representation specific to the type of collection. This conversion is crucial
for handling operations on entries, especially when they need to be treated or accessed as individual values,
such as retrieving the value part from a key-value pair in a hash map.
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoResult<T> for T
impl<T> IntoResult<T> for T
type Err = Infallible
fn into_result(self) -> Result<T, <T as IntoResult<T>>::Err>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
impl<C, Val> ValToEntry<C> for Valwhere
C: CollectionValToEntry<Val>,
Source§fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
fn val_to_entry(self) -> <C as CollectionValToEntry<Val>>::Entry
Invokes the val_to_entry function of the CollectionValToEntry trait to convert the value to an entry.
Source§type Entry = <C as CollectionValToEntry<Val>>::Entry
type Entry = <C as CollectionValToEntry<Val>>::Entry
Represents the type of entry that corresponds to the value within the collection.
Type
Entry is defined by the Collection trait.