From a75c9463626d35eb4c3f00c6ae95172b342f5593 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 16 Mar 2026 15:39:23 +0100 Subject: [PATCH 1/2] fix: make retry public to access retry function --- src/flow_service/mod.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/flow_service/mod.rs b/src/flow_service/mod.rs index 25302c2..e58916f 100644 --- a/src/flow_service/mod.rs +++ b/src/flow_service/mod.rs @@ -10,7 +10,7 @@ use tucana::{ shared::{DefinitionDataType as DataType, FlowType, RuntimeFunctionDefinition}, }; -mod retry; +pub mod retry; pub struct FlowUpdateService { data_types: Vec, From fef3ddeb2dc7dd37f13b0fa6e02a76f4e508c5b1 Mon Sep 17 00:00:00 2001 From: Raphael Date: Mon, 16 Mar 2026 15:41:08 +0100 Subject: [PATCH 2/2] docs: shortend docs to remove outdated informations --- README.md | 86 ++++--------------------------------------------------- 1 file changed, 5 insertions(+), 81 deletions(-) diff --git a/README.md b/README.md index 15508bf..fa0bc66 100644 --- a/README.md +++ b/README.md @@ -3,88 +3,12 @@ [![Crate](https://img.shields.io/crates/v/code0-flow.svg)](https://crates.io/crates/code0-flow) [![Documentation](https://docs.rs/code0-flow/badge.svg)](https://docs.rs/code0-flow) -code0-flow is a Rust library developed by Code0 for managing flows within the FlowQueue and FlowStore. This libray is only for the internal usage of the execution block services (Aquila, Draco & Tarurs) and is not intendet to get used elsewhere. +Internal Rust library for CodeZero execution services (Aquila, Draco, Taurus). It manages flow definitions, config helpers, and health checks. ## Features -- `flow_definition` update the Adapter & Runtime definitions -- `flow_config` base configuration for each service -- `flow_health` provide health checks including NATS connectivity for readiness probes +- `flow_definition` read flow definitions from a filesystem layout (per-feature folders with `data_type/`, `flow_type/`, `runtime_definition/` JSONs) with optional feature/version filtering +- `flow_service` push definitions to Aquila via gRPC (depends on `flow_definition`) +- `flow_config` env helpers and `.env` loading +- `flow_health` tonic health service with NATS readiness -## FlowStore - -### Keys - -The key in the FlowStore in a Store will always have the pattern: - -`flow_id::project_id::flow_type_identifier::` - -E.g. for REST: - -`1::1::REST::test.code0.tech::GET` - -This would be a REST Flow identifier - -## FlowDefinition - -```rust -// Define FlowType -let flow_type = FlowType { - identifier: String::from("REST"), - settings: vec![], - input_type_identifier: Some(String::from("HTTP_REQUEST_OBJECT")), - return_type_identifier: Some(String::from("HTTP_RESPONSE_OBJECT")), - editable: true, - name: vec![Translation { - code: String::from("en-US"), - content: String::from("Rest Endpoint"), - }], - description: vec![Translation { - code: String::from("en-US"), - content: String::from("A REST API is a web service that lets clients interact with data on a server using standard HTTP methods like GET, POST, PUT, and DELETE, usually returning results in JSON format."), - }], -}; - -// Define DataTypes -let data_type = DataType { - variant: 5, - name: vec![Translation { - code: String::from("en-US"), - content: String::from("HTTP Headers"), - }], - identifier: String::from("HTTP_HEADER_MAP"), - input_types: vec![], - return_type: None, - parent_type_identifier: Some(String::from("ARRAY")), - rules: vec![DataTypeRule { - config: Some(Config::ContainsType(DataTypeContainsTypeRuleConfig { - data_type_identifier: String::from("HTTP_HEADER_ENTRY"), - })), - }], -} - -// Send to get updated in Sagittarius -let update_client = code0_flow::flow_definition::FlowUpdateService::from_url(aquila_url) - .with_data_types(vec![data_type]) - .with_flow_types(vec![flow_type]); - -// Response --> true if successfull -update_client.send().await; -``` - -## FlowHealth - -```rust -use code0_flow::flow_health::HealthService; -use tonic_health::pb::health_server::HealthServer; - -// Create health service with NATS URL -let health_service = HealthService::new("nats://localhost:4222".to_string()); - -// Use with tonic gRPC server -let health_server = HealthServer::new(health_service); - -// The service provides: -// - "liveness" check: Always returns Serving (application is running) -// - "readiness" check: Returns Serving only if NATS connection is healthy -```