{"id":19078788,"url":"https://github.com/elasticrash/orchestrator","last_synced_at":"2025-04-30T05:22:50.152Z","repository":{"id":57650289,"uuid":"310318888","full_name":"elasticrash/orchestrator","owner":"elasticrash","description":"A Step function like library for Rust","archived":false,"fork":false,"pushed_at":"2023-06-22T21:02:20.000Z","size":16,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-18T20:49:32.508Z","etag":null,"topics":["orchestration","rust","step-functions"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elasticrash.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-05T14:10:00.000Z","updated_at":"2024-02-20T17:52:31.000Z","dependencies_parsed_at":"2024-11-09T02:12:10.418Z","dependency_job_id":"4481a3d5-69b3-4b26-96ab-200bc5602abc","html_url":"https://github.com/elasticrash/orchestrator","commit_stats":{"total_commits":14,"total_committers":2,"mean_commits":7.0,"dds":0.3571428571428571,"last_synced_commit":"322130e7b58372a5c69b427c69f4a1779a37011f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticrash%2Forchestrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticrash%2Forchestrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticrash%2Forchestrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elasticrash%2Forchestrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elasticrash","download_url":"https://codeload.github.com/elasticrash/orchestrator/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251645989,"owners_count":21620848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["orchestration","rust","step-functions"],"created_at":"2024-11-09T02:12:00.068Z","updated_at":"2025-04-30T05:22:50.132Z","avatar_url":"https://github.com/elasticrash.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Orchestration\n\nThe orchestration library is designed to streamline and manage complex workflows by providing a framework for orchestrating and sequencing functions in a controlled manner. It allows developers to define a series of state functions and execute them in a predefined order, passing data between each step. With the ability to handle various types, the library offers flexibility in processing different data structures.\n\n### Improvements and changes:\n\n* Enhanced type handling capabilities to accommodate a wider range of types.\n* String Concatenation Example: The updated documentation now includes an example showcasing string concatenation. This addition helps users understand how to perform string operations within their orchestration workflows.\n* Improved Calculation Example: The calculation example has been updated to demonstrate the improved capabilities of the library. Users can now leverage the library's features for performing calculations more effectively.\n\n## Setup\n\nTo define an orchestration function, you can utilize the state_function! macro. Here's an example:\n\n\n``` rust\n let fn1: fn(State\u003cf32\u003e) -\u003e Result\u003cState\u003cf32\u003e, Error\u003e =\n        state_function!(pow2, f32);\n```\n\nA state is represented by the following structure:\n\n``` rust\npub struct State\u003cT\u003e {\n    pub proceed: bool,\n    pub outcome: Option\u003cT\u003e,\n    pub stage: Vec\u003cbool\u003e,\n}\n```\n\nIn some cases, you can directly utilize the orchestration by employing the following approach:\n\n``` rust\n  let result = vec![fn1, fn2, fn3]\n        .execute(State {\n            proceed: true,\n            outcome: Some(6.),\n            stage: Vec::\u003cbool\u003e::new(),\n        });\n```\n\nAlternatively, you can use the registration trait to assign string names to the orchestration functions. This approach proves useful when configuring function sequences more generically:\n\n``` rust\n    registry.register(fn1, \"pow2\".to_string());\n    registry.register(fn2, \"pow3\".to_string());\n    registry.register(fn3, \"sqrt\".to_string());\n\n        let result = vec![\"pow2\", \"pow3\", \"sqrt\"]\n        .create(\u0026registry.di_ref)\n        .execute(State {\n            proceed: true,\n            outcome: Some(6.),\n            stage: Vec::\u003cbool\u003e::new(),\n        });\n```\n\nBy assigning values to the stage, as shown in the example below, you can bypass specific steps in the sequence. Marking a step as true allows it to be skipped:\n\n\n```rust\n            stage: vec![true, true, false, false],\n``` \n\nFor a more intricate example, please refer to the following link: \nhttps://github.com/elasticrash/keyboard/blob/master/lib/src/geometry/exported_geometry.rs\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticrash%2Forchestrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felasticrash%2Forchestrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felasticrash%2Forchestrator/lists"}