Skip to content

Minimum PodRun #12

@Synicix

Description

@Synicix
struct RunInfo {
    name: String,
    image: String,
    created: u64,
    terminated: Option<u64>,
    env_vars: HashMap<String, String>,
    command: String,
    state: RunState,
    mounts: Vec<String>,
    labels: HashMap<String, String>,
    cpu_limit: f32,
    memory_limit: u64,
}


struct PodRun<'orch, T> {
    pod_job: PodJob,
    orchestrator: &'orch T,
}

trait PodRunAPI {
    fn new(
        pod_job: PodJob,
        orchestrator: &Self::Orchestrator,
    ) -> Result<PodRun<Self::Orchestrator>>;
    fn get_info(&self) -> Result<RunInfo>;
    fn get_result(&self) -> Result<PodResult>;
    async fn get_result_async(&self) -> Result<PodResult>;
}

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions