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 a colon, or is./...NormalizeError::InvalidEnvironment:environmentisall, the secrets store’s every-environment slot, or falls outside the store’s name grammar.NormalizeError::ReservedEnvVar:envsetsSHEP_INSTANCE,SHEP_NAMEorSHEP_ENVIRONMENT, which shep injects itself.NormalizeError::IncrementVarRemoved:increment_varis set; removed in favour of{{instance}}templating.NormalizeError::MissingScript:scriptis empty.NormalizeError::ZeroInstances:instances == 0.NormalizeError::InvalidCron:cron_restartis not valid in croner’s dialect.NormalizeError::InvalidTimezone:cron_timezoneis not a name in the IANA time-zone database.NormalizeError::InvalidProbe: areadiness_probe/liveness_probetargetProbeTarget::parserejects.NormalizeError::ZeroFailureThreshold: a probe’sfailure_thresholdis explicitly0.NormalizeError::IntervalBelowMinimum: a probe’sintervalis under the floor its own loop honours.NormalizeError::ZeroMaxMemory:max_memoryis0.NormalizeError::ActionTimeoutTooLong:action_timeoutis at or above the ceiling no RPC caller could wait past.NormalizeError::InvalidKillSignal:kill_signalnames a signal the daemon’s stop ladder cannot send.NormalizeError::WatchWithoutCwd:watchistruewith nocwdset.NormalizeError::ZeroWatchDelay:watch_delayis0.NormalizeError::InvalidWatchGlob: awatch_optionsorignore_watchpattern globset will not compile.NormalizeError::BadTemplate: anenv/args/log-path value carries an undefined or unclosed{{...}}token.NormalizeError::SecretInLogPath:out_fileorerr_filecarries a{{secret:...}}.NormalizeError::SharedLogPath:out_fileorerr_filerenders to the same path for two instances.NormalizeError::TildeUser: a path field names another user’s~userhome.NormalizeError::NoHomeForTilde: a path field expands~/but no home directory could be found.NormalizeError::SelfDependency: an app names itself independs_on.NormalizeError::InstanceDependency: adepends_onentry is writtenname:slot.