pub struct Daemon3 { /* private fields */ }
Implementations§
Trait Implementations§
Source§impl From<Daemon3Params> for Daemon3
impl From<Daemon3Params> for Daemon3
Source§fn from(params: Daemon3Params) -> Self
fn from(params: Daemon3Params) -> Self
Converts to this type from the input type.
Source§impl LlmDaemon for Daemon3
impl LlmDaemon for Daemon3
type Config = LlamaConfig
fn config(&self) -> &Self::Config
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<'a, 'b>(&'b self) -> impl Future<Output = Result<()>> + Send + 'awhere
'a: 'b,
fn heartbeat<'a, 'b>(&'b self) -> impl Future<Output = Result<()>> + Send + 'awhere
'a: 'b,
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.
FIXME: Extract heartbeat / ready to Async util?
Auto Trait Implementations§
impl Freeze for Daemon3
impl RefUnwindSafe for Daemon3
impl Send for Daemon3
impl Sync for Daemon3
impl Unpin for Daemon3
impl UnwindSafe for Daemon3
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