fn update_service_status(
        &mut self,
        snapshot: &dyn Snapshot,
        instance: &InstanceSpec,
        status: InstanceStatus,
    ) {
        // Notify the runtime that the service has been committed.
        let runtime = self.runtimes.get_mut(&instance.artifact.runtime_id).expect(
            "BUG: `update_service_status` was invoked for incorrect runtime, \
             this should never happen because of preemptive checks.",
        );
        runtime.update_service_status(snapshot, instance, &status);

        info!(
            "Committing service instance {:?} with status {}",
            instance, status
        );

        self.service_infos.insert(
            instance.id,
            ServiceInfo {
                runtime_id: instance.artifact.runtime_id,
                name: instance.name.to_owned(),
                status,
            },
        );
    }
/// Commits service instance status to the corresponding runtime.
///
/// # Panics
///
/// This method assumes that it was previously checked if runtime can change the state
/// of the service, and will panic if it cannot be done.
Commits service instance status to the corresponding runtime.
Commits service instance status to the corresponding runtime .
fn update_service_status(
        &mut self,
        snapshot: &dyn Snapshot,
        instance: &InstanceSpec,
        status: InstanceStatus,
    ) {
        // Notify the runtime that the service has been committed.
        let runtime = self.runtimes.get_mut(&instance.artifact.runtime_id).expect(
            "BUG: `update_service_status` was invoked for incorrect runtime, \
             this should never happen because of preemptive checks.",
        );
        runtime.update_service_status(snapshot, instance, &status);
        info!(
            "Committing service instance {:?} with status {}",
            instance, status
        );
        self.service_infos.insert(
            instance.id,
            ServiceInfo {
                runtime_id: instance.artifact.runtime_id,
                name: instance.name.to_owned(),
                status,
            },
        );
    }
fn update_service_status ( & mut self , snapshot : & dyn Snapshot , instance : & InstanceSpec , status : InstanceStatus , ) { // Notify the runtime that the service has been committed. let runtime = self . runtimes . get_mut ( & instance . artifact . runtime_id ) . expect ( " \
 " , ) ; runtime . update_service_status ( snapshot , instance , & status ) ; info ! ( " " instance status ) ; self . service_infos . insert ( instance . id , ServiceInfo { runtime_id : instance . artifact . runtime_id , name : instance . name . to_owned ( ) , status , } , ) ; }
Commits service instance status to the corresponding runtime.
Commits service instance status to the corresponding runtime .
&mut self
snapshot
&dyn Snapshot
instance
&InstanceSpec
status
InstanceStatus
&mut self
snapshot
&dyn Snapshot
instance
&InstanceSpec
status
InstanceStatus
panics
This method assumes that it was previously checked if runtime can change the state
of the service, and will panic if it cannot be done.
This method assumes that it was previously checked if runtime can change the state of the service and will panic if it cannot be done .