Csilk 0.2.1
A lightweight, high-performance C HTTP web framework
Loading...
Searching...
No Matches
csilk_data_t Struct Reference

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
 

Detailed Description

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.

Field Documentation

◆ free_fn

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.

◆ meta

void* csilk_data_t::meta

Optional metadata pointer (not freed by the engine). Common use: AI token usage stats.

◆ type

char* csilk_data_t::type

MIME-like type identifier (e.g., "text/plain", "application/json").

◆ value

void* csilk_data_t::value

Opaque data pointer. Ownership semantics depend on free_fn.


The documentation for this struct was generated from the following file: