Skip to main content

ResourceOutputs

Type Alias ResourceOutputs 

Source
pub type ResourceOutputs = IndexMap<String, String>;
Expand description

Key/value properties that a managed resource exposes to its dependents.

The map is ordered by insertion order (backed by indexmap::IndexMap) so that export serializers produce deterministic output.

§Key conventions (manifest-v0)

Resource kindAvailable keys
postgreshost, port, database, user, password, url
redishost, port, password, url
container / dockerfilehost, ports (comma-separated list)

These keys are surfaced at runtime as LSH_<RESOURCE>_<KEY> env vars and substituted into ${resources.<name>.<key>} expressions in sibling resource declarations.

§Example

use lightshuttle_spec::ResourceOutputs;

let mut outputs = ResourceOutputs::new();
outputs.insert("host".into(), "myproject_db".into());
outputs.insert("port".into(), "5432".into());

assert_eq!(outputs["host"], "myproject_db");

Aliased Type§

pub struct ResourceOutputs { /* private fields */ }