pub fn normalize(app: AppConfig) -> Result<ResolvedApp, NormalizeError>Expand description
Validates one app config
§Errors
NormalizeError::MissingName—nameis empty.NormalizeError::InvalidName—namecontains a path separator or is./...NormalizeError::MissingScript—scriptis empty.NormalizeError::ZeroInstances—instances == 0.NormalizeError::InvalidCron—cron_restartis not valid in croner’s dialect (carries the pattern and the rejection reason).NormalizeError::InvalidTimezone—cron_timezoneis not a name in the IANA time-zone database.NormalizeError::InvalidProbe—readiness_probeorliveness_probehas a targetProbeTarget::parserejects (carries which probe and the rendered reason).NormalizeError::ZeroFailureThreshold— a probe’sfailure_thresholdis explicitly0.NormalizeError::IntervalBelowMinimum— a probe’sintervalis under the floor its own loop honours: a full second forliveness_probe, and only “greater than zero” forreadiness_probe(carries which probe, the value and the floor).NormalizeError::ZeroMaxMemory—max_memoryis0.NormalizeError::ActionTimeoutTooLong—action_timeoutis at or above the ceiling no RPC caller could ever be given room to wait past (carries the app name, the value and the ceiling).NormalizeError::InvalidKillSignal—kill_signalnames a signal the daemon’s stop ladder cannot send (carries the app name and the value).NormalizeError::WatchWithoutCwd—watchistruewith nocwdset.NormalizeError::ZeroWatchDelay—watch_delayis0.NormalizeError::InvalidWatchGlob— awatch_optionsorignore_watchpattern globset will not compile (carries the app name, which of the two lists, the pattern and the reason).