pub struct EcsService { /* private fields */ }Implementations§
Source§impl EcsService
impl EcsService
Sourcepub fn run_task_external(
&self,
account_id: &str,
cluster: &str,
task_definition: &str,
launch_type: Option<&str>,
count: usize,
) -> Result<(), String>
pub fn run_task_external( &self, account_id: &str, cluster: &str, task_definition: &str, launch_type: Option<&str>, count: usize, ) -> Result<(), String>
Spawn a task from a cross-service caller (EventBridge Scheduler /
EventBridge Rules) without going through the AwsRequest dispatch
path. Builds the JSON body and reuses Self::run_task so all
the existing validation / runtime spawn logic runs identically.
Returns Err with a human-readable message on validation failures —
the caller decides whether to surface the failure (e.g. DLQ).
pub fn run_task( &self, request: &AwsRequest, ) -> Result<AwsResponse, AwsServiceError>
Source§impl EcsService
impl EcsService
pub fn new(state: SharedEcsState) -> Self
pub fn with_snapshot_store(self, store: Arc<dyn SnapshotStore>) -> Self
pub fn with_runtime(self, runtime: Arc<EcsRuntime>) -> Self
pub fn with_role_trust_validator( self, validator: Arc<dyn RoleTrustValidator>, ) -> Self
pub fn state_handle(&self) -> &SharedEcsState
Sourcepub async fn reconcile_persisted_tasks(&self)
pub async fn reconcile_persisted_tasks(&self)
Reconcile persisted task state with reality after a fakecloud
restart. Same bug class as RDS #1338: tasks were persisted with
lastStatus = RUNNING but their docker containers are gone, so
DescribeTasks reported phantom-running tasks and docker exec
(for ECS Exec) would fail.
Mark every non-STOPPED task as STOPPED with a stoppedReason
that explains the restart, and reset service runningCount /
pendingCount to zero. The service scheduler ticker then
reconciles desiredCount and launches fresh tasks. Standalone
RunTask tasks aren’t auto-respawned because we don’t have
enough context to replay them safely; callers re-invoke.
Trait Implementations§
Source§impl AwsService for EcsService
impl AwsService for EcsService
Source§fn service_name(&self) -> &str
fn service_name(&self) -> &str
Source§fn handle<'life0, 'async_trait>(
&'life0 self,
request: AwsRequest,
) -> Pin<Box<dyn Future<Output = Result<AwsResponse, AwsServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn handle<'life0, 'async_trait>(
&'life0 self,
request: AwsRequest,
) -> Pin<Box<dyn Future<Output = Result<AwsResponse, AwsServiceError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Source§fn supported_actions(&self) -> &[&str]
fn supported_actions(&self) -> &[&str]
Source§fn iam_enforceable(&self) -> bool
fn iam_enforceable(&self) -> bool
FAKECLOUD_IAM=soft|strict). Read moreSource§fn iam_action_for(&self, _request: &AwsRequest) -> Option<IamAction>
fn iam_action_for(&self, _request: &AwsRequest) -> Option<IamAction>
Source§fn iam_condition_keys_for(
&self,
_request: &AwsRequest,
_action: &IamAction,
) -> BTreeMap<String, Vec<String>>
fn iam_condition_keys_for( &self, _request: &AwsRequest, _action: &IamAction, ) -> BTreeMap<String, Vec<String>>
resource_arn. Read morex-amz-tagging, TagResource). Read more