Skip to main content

awsim_datasync/
state.rs

1use dashmap::DashMap;
2use serde_json::Value;
3
4#[derive(Debug, Clone)]
5pub struct Location {
6    pub arn: String,
7    pub uri: String,
8    pub location_type: String,
9    pub config: Value,
10    pub created_at: u64,
11}
12
13#[derive(Debug, Clone)]
14pub struct Task {
15    pub arn: String,
16    pub name: String,
17    pub status: String,
18    pub source_location_arn: String,
19    pub destination_location_arn: String,
20    pub options: Value,
21    pub created_at: u64,
22}
23
24#[derive(Debug, Clone)]
25pub struct TaskExecution {
26    pub arn: String,
27    pub task_arn: String,
28    pub status: String,
29    pub started_at: u64,
30}
31
32#[derive(Debug, Default)]
33pub struct DataSyncState {
34    pub locations: DashMap<String, Location>,
35    pub tasks: DashMap<String, Task>,
36    pub executions: DashMap<String, TaskExecution>,
37}