pub struct DeploymentConfig {
pub api_url: String,
pub api_key: String,
pub docker_compose: String,
pub env_vars: HashMap<String, String>,
pub teepod_id: u64,
pub image: String,
pub vm_config: Option<VmConfig>,
}Expand description
Configuration for deploying applications to the Phala TEE Cloud.
This struct contains all the parameters needed to create a deployment, including API credentials, Docker Compose configuration, and environment variables.
Fields§
§api_url: StringBase URL for the Phala TEE Cloud API
api_key: StringAPI key for authentication with the Phala Cloud API
docker_compose: StringDocker Compose configuration as a string
env_vars: HashMap<String, String>Environment variables to be securely encrypted and included in the deployment
teepod_id: u64ID of the TEEPod to deploy to
image: StringDocker image to deploy
vm_config: Option<VmConfig>Optional custom VM configuration
Implementations§
Source§impl DeploymentConfig
impl DeploymentConfig
Sourcepub fn new(
api_key: String,
docker_compose: String,
env_vars: HashMap<String, String>,
teepod_id: u64,
image: String,
) -> Self
pub fn new( api_key: String, docker_compose: String, env_vars: HashMap<String, String>, teepod_id: u64, image: String, ) -> Self
Creates a new deployment configuration with default API URL.
§Parameters
api_key- API key for authenticating with the Phala Cloud APIdocker_compose- Docker Compose configuration as a stringenv_vars- Environment variables to include in the deploymentteepod_id- ID of the TEEPod to deploy toimage- Docker image to deploy
§Returns
A new DeploymentConfig instance with the default API URL
Sourcepub fn with_api_url(self, api_url: String) -> Self
pub fn with_api_url(self, api_url: String) -> Self
Sourcepub fn with_vm_config(self, vm_config: VmConfig) -> Self
pub fn with_vm_config(self, vm_config: VmConfig) -> Self
Trait Implementations§
Source§impl Clone for DeploymentConfig
impl Clone for DeploymentConfig
Source§fn clone(&self) -> DeploymentConfig
fn clone(&self) -> DeploymentConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DeploymentConfig
impl Debug for DeploymentConfig
Source§impl<'de> Deserialize<'de> for DeploymentConfig
impl<'de> Deserialize<'de> for DeploymentConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for DeploymentConfig
impl RefUnwindSafe for DeploymentConfig
impl Send for DeploymentConfig
impl Sync for DeploymentConfig
impl Unpin for DeploymentConfig
impl UnwindSafe for DeploymentConfig
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