Skip to main content

ContainerConfig

Struct ContainerConfig 

Source
pub struct ContainerConfig {
Show 14 fields pub id: u32, pub name: String, pub image: String, pub cpu_cores: u32, pub memory_mb: u32, pub storage_gb: u32, pub password: String, pub ssh_key: Option<String>, pub host_port: Option<u16>, pub template_ports: Vec<PortMapping>, pub template_env: HashMap<String, String>, pub extra_runtime_args: Vec<String>, pub data_path: Option<String>, pub volume_encryption_key: Option<[u8; 32]>,
}

Fields§

§id: u32§name: String§image: String§cpu_cores: u32§memory_mb: u32§storage_gb: u32§password: String§ssh_key: Option<String>§host_port: Option<u16>

SSH host-port forwarding (LXD/Proxmox: SSH access). Distinct from template_ports which are workload-specific.

§template_ports: Vec<PortMapping>

Workload ports the consumer reaches (e.g. nostr-relay 7777, bitcoind RPC 18443). Empty for non-template spawns. Docker backend translates each to -p host:container; LXD/Proxmox backends ignore for now.

§template_env: HashMap<String, String>

Workload environment variables (template defaults + consumer overrides). Docker backend passes via -e KEY=VAL.

§extra_runtime_args: Vec<String>

Extra docker run flags from the template definition (e.g. --ulimit nofile=1048576:1048576 for strfry). LXD/Proxmox backends ignore these.

§data_path: Option<String>

In-container path for the workload’s persistent state. Docker backend mounts a vmid-scoped volume there. None = stateless (no volume created).

§volume_encryption_key: Option<[u8; 32]>

Optional 32-byte LUKS key for the persistent data volume. When set (Phase 2 of consumer-encrypted-volumes), the DockerBackend creates a LUKS-on-loop file instead of a plain Docker named volume; the key is fed to cryptsetup luksFormat/luksOpen over stdin and never persisted to disk. On delete_container the LUKS header is erased (cryptsetup luksErase) so the keyslots are unrecoverable even if the operator forensically extracts the underlying file.

Provider populates this from EncryptedSpawnPodRequest.volume_encryption.decoded_key() when present; None means a plain volume (today’s default). data_path: None makes this field a no-op (stateless workloads have nothing to encrypt).

Trait Implementations§

Source§

impl Clone for ContainerConfig

Source§

fn clone(&self) -> ContainerConfig

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for ContainerConfig

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<A, B, T> HttpServerConnExec<A, B> for T
where B: Body,