pub struct DeploymentState {Show 21 fields
pub session_id: String,
pub step: Step,
pub owner: String,
pub label: String,
pub sdl_content: Option<String>,
pub template_variables: Option<HashMap<String, String>>,
pub template_defaults: Option<HashMap<String, String>>,
pub is_template: bool,
pub deposit_uakt: u64,
pub dseq: Option<u64>,
pub gseq: u32,
pub oseq: u32,
pub cert_pem: Option<Vec<u8>>,
pub key_pem: Option<Vec<u8>>,
pub bids: Vec<Bid>,
pub selected_provider: Option<String>,
pub endpoints: Vec<ServiceEndpoint>,
pub lease_id: Option<LeaseId>,
pub created_at: u64,
pub updated_at: u64,
pub tx_hashes: Vec<String>,
}Expand description
Full workflow state — serializable, restorable.
Fields§
§session_id: StringUnique session identifier.
step: StepCurrent step in the workflow.
owner: StringAccount address that owns this deployment.
label: StringUser-defined label for the deployment.
sdl_content: Option<String>SDL content (YAML).
template_variables: Option<HashMap<String, String>>Template variable overrides.
template_defaults: Option<HashMap<String, String>>Template default values.
is_template: boolWhether the SDL content is a template.
deposit_uakt: u64Deposit amount in uakt.
dseq: Option<u64>Deployment sequence number (from chain).
gseq: u32Group sequence (usually 1).
oseq: u32Order sequence (usually 1).
cert_pem: Option<Vec<u8>>Certificate PEM (public).
key_pem: Option<Vec<u8>>Private key PEM (encrypted or plaintext depending on backend).
bids: Vec<Bid>Available bids from providers.
selected_provider: Option<String>Selected provider address.
endpoints: Vec<ServiceEndpoint>Service endpoints after deployment.
lease_id: Option<LeaseId>Lease ID once created.
created_at: u64Unix timestamp of creation.
updated_at: u64Unix timestamp of last update.
tx_hashes: Vec<String>Transaction hashes for all txs in this workflow.
Implementations§
Source§impl DeploymentState
impl DeploymentState
Sourcepub fn new(session_id: impl Into<String>, owner: impl Into<String>) -> Self
pub fn new(session_id: impl Into<String>, owner: impl Into<String>) -> Self
Create a new deployment state.
Sourcepub fn with_label(self, label: impl Into<String>) -> Self
pub fn with_label(self, label: impl Into<String>) -> Self
Set the label.
Sourcepub fn with_deposit(self, deposit_uakt: u64) -> Self
pub fn with_deposit(self, deposit_uakt: u64) -> Self
Set the deposit amount.
Sourcepub fn with_template(self, defaults: HashMap<String, String>) -> Self
pub fn with_template(self, defaults: HashMap<String, String>) -> Self
Set template defaults and mark as template.
Sourcepub fn with_variables(self, variables: HashMap<String, String>) -> Self
pub fn with_variables(self, variables: HashMap<String, String>) -> Self
Set template variable overrides.
Sourcepub fn is_terminal(&self) -> bool
pub fn is_terminal(&self) -> bool
Is this workflow in a terminal state?
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Is this workflow complete?
Sourcepub fn transition(&mut self, step: Step)
pub fn transition(&mut self, step: Step)
Transition to a new step.
Trait Implementations§
Source§impl Clone for DeploymentState
impl Clone for DeploymentState
Source§fn clone(&self) -> DeploymentState
fn clone(&self) -> DeploymentState
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more