Skip to main content

Module task

Module task 

Source
Expand description

Task orchestration.

Rust implementation of ClusterShell.Task.

A Task manages a coordinated collection of independent parallel Worker objects, providing a high-level API for executing commands locally or across remote nodes and collecting their results.

§Example

use consortium::task::Task;

let mut task = Task::new();
task.shell("hostname", None, None);
task.run(None).unwrap();

for (rc, nodes) in task.iter_retcodes(None) {
    println!("rc={}: {:?}", rc, nodes);
}

Structs§

Task
A Task manages a set of workers and their results.
TaskDefaults
Configuration for the task’s default behavior.
TaskInfo
Runtime info for the task.

Enums§

TaskError
Error types for the task module.
TaskState
Current state of the task.

Type Aliases§

Result
Result type alias for task operations.
Source
Identifies a source of output: a (worker_id, node_name) pair.