Class IaCStreamingAccumulator
java.lang.Object
com.scivicslab.pojoactor.core.accumulator.StreamingAccumulator
com.scivicslab.actoriac.IaCStreamingAccumulator
- All Implemented Interfaces:
com.scivicslab.pojoactor.core.accumulator.Accumulator
public class IaCStreamingAccumulator
extends com.scivicslab.pojoactor.core.accumulator.StreamingAccumulator
StreamingAccumulator with cowsay display support for actor-IaC.
This accumulator extends StreamingAccumulator to add cowsay
ASCII art visualization for workflow step transitions. The cowfile (character)
can be customized to show different ASCII art animals.
Example Usage
IaCStreamingAccumulator acc = new IaCStreamingAccumulator();
acc.setCowfile("tux"); // Use Linux penguin
acc.cowsay("my-workflow", "- states: [\"0\", \"1\"]\n actions: ...");
Available Cowfiles
44 cowfiles are available including: tux, dragon, stegosaurus, kitty, bunny, turtle, elephant, ghostbusters, vader, and many more.
- Since:
- 2.12.0
- Author:
- devteam@scivicslab.com
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs an IaCStreamingAccumulator with default settings. -
Method Summary
Modifier and TypeMethodDescriptionGets the cowfile name for cowsay output.static String[]Lists all available cowfile names.renderCowsay(String workflowName, String stepYaml) Renders a workflow step as cowsay ASCII art and returns the result.voidsetCowfile(String cowfile) Sets the cowfile name for cowsay output.Methods inherited from class com.scivicslab.pojoactor.core.accumulator.StreamingAccumulator
add, clear, getCount, getSummary
-
Field Details
-
cowfile
-
-
Constructor Details
-
IaCStreamingAccumulator
public IaCStreamingAccumulator()Constructs an IaCStreamingAccumulator with default settings.
-
-
Method Details
-
setCowfile
Sets the cowfile name for cowsay output.Available cowfiles include: tux, dragon, stegosaurus, kitty, bunny, turtle, elephant, ghostbusters, vader, and many more (44 total).
- Parameters:
cowfile- the cowfile name (e.g., "tux", "dragon"), or null for default cow
-
getCowfile
Gets the cowfile name for cowsay output.- Returns:
- the cowfile name, or null if using default cow
-
renderCowsay
Renders a workflow step as cowsay ASCII art and returns the result.This method formats the workflow name and step YAML into a cowsay message with the configured cowfile character. The rendered ASCII art is returned as a string instead of being printed directly, allowing the caller to send it to the output multiplexer.
- Parameters:
workflowName- the name of the workflowstepYaml- the YAML representation of the step (first 10 lines recommended)- Returns:
- the rendered cowsay ASCII art string
-
listCowfiles
Lists all available cowfile names.- Returns:
- array of available cowfile names
-