pub struct ManagedConfig {
pub serve_program: Option<PathBuf>,
pub version_probe: Option<(PathBuf, Vec<String>)>,
pub data_root: PathBuf,
pub models: Arc<ModelRegistry>,
pub env: Vec<(String, String)>,
pub env_passthrough: Vec<String>,
pub run_as: Option<(u32, u32)>,
pub restart: RestartPolicy,
pub keep_alive: String,
pub ledger: Option<Arc<ResidencyLedger>>,
}Expand description
What managed mode needs.
Fields§
§serve_program: Option<PathBuf>The launcher script (serve-llamacpp, serve). Not used by Ollama,
which manages its own process.
version_probe: Option<(PathBuf, Vec<String>)>Optional capability probe command (llama-server --version); exit 0
is a pass and the first stdout line is recorded as the version.
data_root: PathBufWhere per-instance working directories are created.
models: Arc<ModelRegistry>Adopted model manifests; the only source of weight paths.
env: Vec<(String, String)>Extra environment for the server (the parent’s is cleared).
env_passthrough: Vec<String>Names of parent environment variables to forward (HOME,
HF_HOME, PATH). The default forwards the daemon’s PATH and
HOME to the launcher: the server runs with the daemon’s search
path and home directory. A forwarded or explicit env PATH wins
over the supervisor’s default one.
run_as: Option<(u32, u32)>(uid, gid) to drop to when the host runs as root.
restart: RestartPolicyRestart backoff.
keep_alive: StringOllama keep_alive sent when loading a model (5m, 30m, -1).
ledger: Option<Arc<ResidencyLedger>>Unified-memory budget and co-residency, shared by every managed
adapter on the node. None: no check (a single adapter, or the
operator did not ask for one).
Implementations§
Source§impl ManagedConfig
impl ManagedConfig
Sourcepub fn new(models: Arc<ModelRegistry>, data_root: PathBuf) -> Self
pub fn new(models: Arc<ModelRegistry>, data_root: PathBuf) -> Self
Defaults: no launcher, HOME and PATH forwarded, default backoff.
Sourcepub fn with_ledger(self, ledger: Arc<ResidencyLedger>) -> Self
pub fn with_ledger(self, ledger: Arc<ResidencyLedger>) -> Self
Share a residency ledger (budget and co-residency).
Sourcepub fn with_serve_program(self, p: impl Into<PathBuf>) -> Self
pub fn with_serve_program(self, p: impl Into<PathBuf>) -> Self
Launcher script.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ManagedConfig
impl RefUnwindSafe for ManagedConfig
impl Send for ManagedConfig
impl Sync for ManagedConfig
impl Unpin for ManagedConfig
impl UnsafeUnpin for ManagedConfig
impl UnwindSafe for ManagedConfig
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
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> ⓘ
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