Skip to main content

render_config

Function render_config 

Source
pub fn render_config(
    data_dir: &str,
    port: &str,
    upstreams: &[String],
) -> Result<Vec<u8>, ConfigError>
Expand description

Builds a zot config JSON body from the given parameters. data_dir is where zot stores cached blobs/manifests; port is the listen port; upstreams is the list of registry hostnames to proxy (as they appear in image references – e.g. "docker.io", not the registry’s host URL).

Returns ConfigError::NoUpstreams when upstreams is empty.