pub struct ResolvedResource {
pub spec: ContainerSpec,
pub outputs: ResourceOutputs,
}Expand description
A ContainerSpec bundled with the ResourceOutputs the
resource exposes to its dependents at runtime.
Produced by from_resource and consumed by both
lightshuttle-runtime (to launch the container) and
lightshuttle-export (to emit a Compose/Helm artifact).
§Example
use lightshuttle_manifest::{PostgresConfig, ResourceKind};
use lightshuttle_spec::from_resource;
// Resolve a postgres resource declared in a manifest.
let kind = ResourceKind::Postgres(PostgresConfig::default());
let resolved = from_resource("myproject", "db", &kind).unwrap();
// The spec carries the container description.
assert_eq!(resolved.spec.resource, "db");
// The outputs expose the connection URL to dependents.
assert!(resolved.outputs.contains_key("url"));Fields§
§spec: ContainerSpecContainer specification consumed by the runtime and the export pipeline to describe the container to launch.
outputs: ResourceOutputsKey/value properties exposed to dependents, resolved into
LSH_* env vars and substituted into
${resources.<name>.<property>} expressions.
Trait Implementations§
Source§impl Clone for ResolvedResource
impl Clone for ResolvedResource
Source§fn clone(&self) -> ResolvedResource
fn clone(&self) -> ResolvedResource
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for ResolvedResource
impl RefUnwindSafe for ResolvedResource
impl Send for ResolvedResource
impl Sync for ResolvedResource
impl Unpin for ResolvedResource
impl UnsafeUnpin for ResolvedResource
impl UnwindSafe for ResolvedResource
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more