pub struct AppConfig {
pub name: String,
pub cmd: Vec<String>,
pub cwd: Option<String>,
pub env: HashMap<String, String>,
pub autorestart: bool,
pub max_restarts: Option<u32>,
pub restart_delay_ms: Option<u32>,
pub min_uptime_ms: Option<u32>,
pub kill_timeout_ms: Option<u32>,
}Expand description
One [[app]] table inside a runpm.toml config file.
Field-for-field shape of crate::proto::daemon::ServiceConfig
minus the daemon-side defaults; the cwd field is resolved against
the config file’s parent dir by RunpmConfig::resolve_cwd.
Fields§
§name: StringService name — must be unique within the file.
cmd: Vec<String>Executable plus arguments. Empty cmd is rejected.
cwd: Option<String>Working directory. Relative paths are resolved against the
config file’s parent directory by RunpmConfig::resolve_cwd.
env: HashMap<String, String>Environment variables overlaid on the daemon’s environment.
autorestart: boolAuto-restart on exit. Defaults to true to match PM2 ergonomics.
max_restarts: Option<u32>Maximum restart attempts. None => use daemon default (unlimited).
restart_delay_ms: Option<u32>Backoff between restarts (milliseconds). None => use daemon
default. Values are capped at u32::MAX ms (~49 days) by the
daemon wire format.
min_uptime_ms: Option<u32>Minimum uptime (milliseconds) before the restart counter resets.
Capped at u32::MAX ms by the daemon wire format.
kill_timeout_ms: Option<u32>Grace period (milliseconds) during runpm stop before
SIGKILL/TerminateProcess. Capped at u32::MAX ms.
Trait Implementations§
Source§impl<'de> Deserialize<'de> for AppConfig
impl<'de> Deserialize<'de> for AppConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for AppConfig
impl RefUnwindSafe for AppConfig
impl Send for AppConfig
impl Sync for AppConfig
impl Unpin for AppConfig
impl UnsafeUnpin for AppConfig
impl UnwindSafe for AppConfig
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,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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