Skip to main content

AlienEvent

Enum AlienEvent 

Source
pub enum AlienEvent {
Show 31 variants LoadingConfiguration, Finished, BuildingStack { stack: String, }, RunningPreflights { stack: String, platform: String, }, DownloadingAlienRuntime { target_triple: String, url: String, }, BuildingResource { resource_name: String, resource_type: String, related_resources: Vec<String>, }, BuildingImage { image: String, }, PushingImage { image: String, progress: Option<PushProgress>, }, PushingStack { stack: String, platform: String, }, PushingResource { resource_name: String, resource_type: String, }, CreatingRelease { project: String, }, CompilingCode { language: String, progress: Option<String>, }, StackStep { next_state: StackState, suggested_delay_ms: Option<u64>, }, GeneratingCloudFormationTemplate, GeneratingTemplate { platform: String, }, ProvisioningAgent { agent_id: String, release_id: String, }, UpdatingAgent { agent_id: String, release_id: String, }, DeletingAgent { agent_id: String, release_id: String, }, DebuggingAgent { agent_id: String, debug_session_id: String, }, PreparingEnvironment { strategy_name: String, }, DeployingStack { stack_name: String, }, RunningTestFunction { stack_name: String, }, CleaningUpStack { stack_name: String, strategy_name: String, }, CleaningUpEnvironment { stack_name: String, strategy_name: String, }, SettingUpPlatformContext { platform_name: String, }, EnsuringDockerRepository { repository_name: String, }, DeployingCloudFormationStack { cfn_stack_name: String, current_status: String, }, AssumingRole { role_arn: String, }, ImportingStackStateFromCloudFormation { cfn_stack_name: String, }, DeletingCloudFormationStack { cfn_stack_name: String, current_status: String, }, EmptyingBuckets { bucket_names: Vec<String>, },
}
Expand description

Represents all possible events in the Alien system

Variants§

§

LoadingConfiguration

Loading configuration file

§

Finished

Operation finished successfully

§

BuildingStack

Stack packaging event

Fields

§stack: String

Name of the stack being built

§

RunningPreflights

Running build-time preflight checks and mutations

Fields

§stack: String

Name of the stack being checked

§platform: String

Platform being targeted

§

DownloadingAlienRuntime

Downloading alien runtime event

Fields

§target_triple: String

Target triple for the runtime

§url: String

URL being downloaded from

§

BuildingResource

Resource build event (function, container, or worker)

Fields

§resource_name: String

Name of the resource being built

§resource_type: String

Type of the resource: “function”, “container”, “worker”

§related_resources: Vec<String>

All resource names sharing this build (for deduped container groups)

§

BuildingImage

Image build event

Fields

§image: String

Name of the image being built

§

PushingImage

Image push event

Fields

§image: String

Name of the image being pushed

§progress: Option<PushProgress>

Progress information for the push operation

§

PushingStack

Pushing stack images to registry

Fields

§stack: String

Name of the stack being pushed

§platform: String

Target platform

§

PushingResource

Pushing resource images to registry

Fields

§resource_name: String

Name of the resource being pushed

§resource_type: String

Type of the resource: “function”, “container”, “worker”

§

CreatingRelease

Creating a release on the platform

Fields

§project: String

Project name

§

CompilingCode

Code compilation event (rust, typescript, etc.)

Fields

§language: String

Language being compiled (rust, typescript, etc.)

§progress: Option<String>

Current progress/status line from the build output

§

StackStep

Fields

§next_state: StackState

The resulting state of the stack after the step.

§suggested_delay_ms: Option<u64>

An suggested duration to wait before executing the next step.

§

GeneratingCloudFormationTemplate

Generating CloudFormation template

§

GeneratingTemplate

Generating infrastructure template

Fields

§platform: String

Platform for which the template is being generated

§

ProvisioningAgent

Provisioning a new agent

Fields

§agent_id: String

ID of the agent being provisioned

§release_id: String

ID of the release being deployed to the agent

§

UpdatingAgent

Updating an existing agent

Fields

§agent_id: String

ID of the agent being updated

§release_id: String

ID of the new release being deployed to the agent

§

DeletingAgent

Deleting an agent

Fields

§agent_id: String

ID of the agent being deleted

§release_id: String

ID of the release that was running on the agent

§

DebuggingAgent

Starting a debug session for an agent

Fields

§agent_id: String

ID of the agent being debugged

§debug_session_id: String

ID of the debug session

§

PreparingEnvironment

Preparing environment for deployment

Fields

§strategy_name: String

Name of the deployment strategy being used

§

DeployingStack

Deploying stack with alien-infra

Fields

§stack_name: String

Name of the stack being deployed

§

RunningTestFunction

Running test function after deployment

Fields

§stack_name: String

Name of the stack being tested

§

CleaningUpStack

Cleaning up deployed stack resources

Fields

§stack_name: String

Name of the stack being cleaned up

§strategy_name: String

Name of the deployment strategy being used for cleanup

§

CleaningUpEnvironment

Cleaning up deployment environment

Fields

§stack_name: String

Name of the stack being cleaned up

§strategy_name: String

Name of the deployment strategy being used for cleanup

§

SettingUpPlatformContext

Setting up platform context

Fields

§platform_name: String

Name of the platform (e.g., “AWS”, “GCP”)

§

EnsuringDockerRepository

Ensuring docker repository exists

Fields

§repository_name: String

Name of the docker repository

§

DeployingCloudFormationStack

Deploying CloudFormation stack

Fields

§cfn_stack_name: String

Name of the CloudFormation stack

§current_status: String

Current stack status

§

AssumingRole

Assuming AWS IAM role

Fields

§role_arn: String

ARN of the role to assume

§

ImportingStackStateFromCloudFormation

Importing stack state from CloudFormation

Fields

§cfn_stack_name: String

Name of the CloudFormation stack

§

DeletingCloudFormationStack

Deleting CloudFormation stack

Fields

§cfn_stack_name: String

Name of the CloudFormation stack

§current_status: String

Current stack status

§

EmptyingBuckets

Emptying S3 buckets before stack deletion

Fields

§bucket_names: Vec<String>

Names of the S3 buckets being emptied

Implementations§

Source§

impl AlienEvent

Source

pub async fn emit(self) -> Result<EventHandle>

Emit this event and wait for it to be handled

Source

pub async fn emit_with_state(self, state: EventState) -> Result<EventHandle>

Emit this event with a specific initial state

Source

pub async fn emit_with_parent(self, parent_id: &str) -> Result<EventHandle>

Emit this event as a child of another event

Source

pub async fn in_scope<F, Fut, T, E>(self, f: F) -> Result<T, AlienError<E>>
where F: FnOnce(EventHandle) -> Fut, Fut: Future<Output = Result<T, AlienError<E>>>, E: AlienErrorData + Clone + Debug + Serialize + Send + Sync + 'static,

Start a scoped event that will track success/failure All events emitted within the scope will automatically be children of this event

Trait Implementations§

Source§

impl Clone for AlienEvent

Source§

fn clone(&self) -> AlienEvent

Returns a duplicate of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for AlienEvent

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for AlienEvent

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for AlienEvent

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. 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> 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> Serialize for T
where T: Serialize + ?Sized,

Source§

fn erased_serialize(&self, serializer: &mut dyn Serializer) -> Result<(), Error>

Source§

fn do_erased_serialize( &self, serializer: &mut dyn Serializer, ) -> Result<(), ErrorImpl>

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<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,