Struct llm_daemon::LlamaDaemon
source · pub struct LlamaDaemon { /* private fields */ }
Implementations§
Trait Implementations§
source§impl LlmDaemon for Daemon2
impl LlmDaemon for Daemon2
source§fn fork_daemon(&self) -> Result<()>
fn fork_daemon(&self) -> Result<()>
Spawns the daemon, initializing any necessary resources or processes.
This method is expected to be called before creation of tokio runtime, mostly
due to the use of the
fork
. User is free to use async runtime after
calling this.source§fn heartbeat(&self) -> impl Future<Output = Result<()>> + Send + 'static
fn heartbeat(&self) -> impl Future<Output = Result<()>> + Send + 'static
Creates a task which maintains a periodic heartbeat to the daemon.
Daemon is expected to terminate if there’s no heartbeat for a certain period of time.
Keeping this task within async runtime will ensure that the daemon is kept running
during the application.
type Config = LlamaConfig
Auto Trait Implementations§
impl Freeze for Daemon2
impl RefUnwindSafe for Daemon2
impl Send for Daemon2
impl Sync for Daemon2
impl Unpin for Daemon2
impl UnwindSafe for Daemon2
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