Files
osmedeus/test/testdata/workflows/test-event-receiver.yaml
T
j3ssie 7de3e7b2b2 feat: add performance optimizations and robustness improvements
- Add lock-free ResultCollector for parallel execution with atomic operations, eliminating mutex contention for pre-allocated slices
- Implement circuit breaker pattern (internal/retry/circuit_breaker) with configurable thresholds and half-open recovery state for fault tolerance
- Introduce json-iterator replacement (internal/json) for 2-6x faster JSON operations while maintaining stdlib compatibility
- Add lazy template rendering (RenderLazy) with variable reference caching for 50-80% faster rendering on large contexts
- Implement memory-efficient buffer pooling (bufpool) with 10MB pre-allocated reusable buffers for reduced GC pressure
- Add LoadFlowWithModules for parallel module pre-loading using errgroup, improving startup time for complex flows
- Add VarRefCache with LRU eviction for variable extraction caching
- Add streaming output support for foreach loops to process large datasets without memory accumulation
- Fix json import compatibility in llm_executor and db_functions
- Update test fixtures with correct YAML field names (call→function, run→command)
2026-01-31 01:26:28 +07:00

43 lines
1006 B
YAML

name: test-event-receiver
kind: module
description: Test workflow that receives events via trigger
tags: test,event,receiver,trigger
triggers:
- name: on-new-subdomain
on: event
event:
topic: "assets.new"
filters:
- "event.source == 'test-emitter'"
- "event.data_type == 'subdomain'"
enabled: true
- name: on-vulnerability
on: event
event:
topic: "vulnerabilities.new"
filters:
- "event.source == 'test-scanner'"
- "event.data.severity == 'high' || event.data.severity == 'critical'"
enabled: true
params:
- name: target
required: true
steps:
- name: log-received
type: function
function: |
log_info("Event received for target: {{target}}")
- name: process-target
type: bash
command: 'echo "Processing event target: {{target}}" > {{Output}}/processed.txt'
- name: mark-complete
type: function
function: |
appendFile("{{Output}}/events.log", "Processed: {{target}}\n")