|
Csilk 0.2.1
A lightweight, high-performance C HTTP web framework
|
Generic data container for passing messages between workflow nodes. More...
#include <workflow.h>
Data Fields | |
| char * | type |
| void * | value |
| void(* | free_fn )(void *) |
| void * | meta |
Generic data container for passing messages between workflow nodes.
Every node receives a csilk_data_t as input and returns one as output. The type string allows downstream nodes to switch behaviour based on content type. The optional free_fn callback lets the workflow engine clean up heap-allocated values when the data is no longer needed. The meta field is a catch-all for extra information (e.g., AI token counts, timing metrics) and is NOT freed by the engine.
| void(* csilk_data_t::free_fn) (void *) |
Optional: called by the engine to free value when the data is consumed. NULL means the engine does NOT take ownership.
| void* csilk_data_t::meta |
Optional metadata pointer (not freed by the engine). Common use: AI token usage stats.
| char* csilk_data_t::type |
MIME-like type identifier (e.g., "text/plain", "application/json").
| void* csilk_data_t::value |
Opaque data pointer. Ownership semantics depend on free_fn.