pub struct LighthouseHandle {
command_tx: UnboundedSender<EngineCommand>,
}
Expand description
Handle for interacting with a running lighthouse engine
Fields§
§command_tx: UnboundedSender<EngineCommand>
Implementations§
Source§impl LighthouseHandle
impl LighthouseHandle
Sourcepub async fn update_metrics(
&self,
metrics: ResourceMetrics,
) -> LighthouseResult<()>
pub async fn update_metrics( &self, metrics: ResourceMetrics, ) -> LighthouseResult<()>
Send metrics to the engine
Sourcepub async fn update_config(
&self,
config: LighthouseConfig,
) -> LighthouseResult<()>
pub async fn update_config( &self, config: LighthouseConfig, ) -> LighthouseResult<()>
Update the engine configuration
Sourcepub async fn get_recommendation(
&self,
resource_id: ResourceId,
) -> LighthouseResult<Option<ScaleAction>>
pub async fn get_recommendation( &self, resource_id: ResourceId, ) -> LighthouseResult<Option<ScaleAction>>
Get a scaling recommendation for a resource
Sourcepub async fn get_status(&self) -> LighthouseResult<EngineStatus>
pub async fn get_status(&self) -> LighthouseResult<EngineStatus>
Get current engine status
Sourcepub async fn shutdown(&self) -> LighthouseResult<()>
pub async fn shutdown(&self) -> LighthouseResult<()>
Shutdown the engine
Trait Implementations§
Source§impl Clone for LighthouseHandle
impl Clone for LighthouseHandle
Source§fn clone(&self) -> LighthouseHandle
fn clone(&self) -> LighthouseHandle
Returns a copy 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 LighthouseHandle
impl RefUnwindSafe for LighthouseHandle
impl Send for LighthouseHandle
impl Sync for LighthouseHandle
impl Unpin for LighthouseHandle
impl UnwindSafe for LighthouseHandle
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