Skip to main content

image_ref

Function image_ref 

Source
pub fn image_ref<F>(component: &Component, env_lookup: F) -> ImageRef
where F: Fn(&str) -> Option<String>,
Expand description

Resolve a component’s image reference from the environment, falling back to its public GHCR default.

The environment lookup is injected (rather than read from the process) so this stays a pure function — unit-testable without touching global state. Production callers pass |k| std::env::var(k).ok().