pub struct FleetHead { /* private fields */ }Implementations§
Source§impl FleetHead
impl FleetHead
pub fn connect(addr: &str, auth: Vec<u8>) -> Result<FleetHead, DaemonError>
Sourcepub fn accept(sock: TcpStream, auth: Vec<u8>) -> Result<FleetHead, DaemonError>
pub fn accept(sock: TcpStream, auth: Vec<u8>) -> Result<FleetHead, DaemonError>
A node that dialed in; the head still opens the handshake, encrypted when it has a token.
pub fn node(&self) -> &HelloAckF
Sourcepub fn drain_status(&mut self) -> Result<(), DaemonError>
pub fn drain_status(&mut self) -> Result<(), DaemonError>
Reads what the node sent while the connection sat idle; an error means it is gone.
pub fn keepalive(&mut self) -> Result<(), DaemonError>
pub fn knows(&self, session_id: u64) -> bool
pub fn reconnect( &mut self, addr: &str, auth: Vec<u8>, ) -> Result<Vec<u64>, DaemonError>
pub fn assign( &mut self, session_id: u64, params: GenParams, qos_class: u8, codec: &str, lease: Lease, ) -> Result<u64, DaemonError>
pub fn park(&mut self, session_id: u64) -> Result<(), DaemonError>
Sourcepub fn revoke(&mut self, session_id: u64, epoch: u64) -> Result<(), DaemonError>
pub fn revoke(&mut self, session_id: u64, epoch: u64) -> Result<(), DaemonError>
Ends the session on the node, which frees the context it kept. epoch is the one it was
last assigned, so this also reaches a session placed over another connection.
pub fn append( &mut self, session_id: u64, tokens: &[u32], ) -> Result<(), DaemonError>
pub fn generate( &mut self, session_id: u64, max_new_tokens: u64, max_wall_ms: u64, ) -> Result<FleetGeneration, DaemonError>
pub fn generate_streaming( &mut self, session_id: u64, max_new_tokens: u64, max_wall_ms: u64, cancel: &AtomicBool, on_tokens: impl FnMut(&[u32]), ) -> Result<FleetGeneration, DaemonError>
pub fn forward_stage( &mut self, tokens: &[u32], start_layer: u32, end_layer: u32, hidden_in: Option<Vec<u8>>, ) -> Result<StageOutput, DaemonError>
pub fn generate_chat( &mut self, session_id: u64, codec: &dyn TextCodec, messages: &[ChatMessage], tools: &[String], max_new_tokens: u64, max_wall_ms: u64, ) -> Result<Vec<FleetSegment>, DaemonError>
pub fn wal(&self) -> &WalStub
Auto Trait Implementations§
impl !RefUnwindSafe for FleetHead
impl !UnwindSafe for FleetHead
impl Freeze for FleetHead
impl Send for FleetHead
impl Sync for FleetHead
impl Unpin for FleetHead
impl UnsafeUnpin for FleetHead
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
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> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more