Struct CatalystCoprocessorFnInfo¶
Defined in File TransportABI.h
Struct Documentation¶
-
struct CatalystCoprocessorFnInfo¶
The lifecycle hooks of a coprocessor function or launcher. The library defining the function may export them as
const CatalystCoprocessorFnInfo *<symbol>_info(void), where<symbol>is the function’s name. The runtime looks<symbol>_infoup only in the library that defines<symbol>. A function without it is bound with a null ctx.abi_version: the version whose fields the library fills, at least 1. The struct only grows at its end, and the runtime reads only the fields of the versions it knows. A field added by a later version must be optional: null or zero keeps the behaviour of the earlier versions.reserved: zero. It fills the 4 bytes beforeinit, which would otherwise be padding, and the runtime ignores it. A later version may give it a meaning, for which zero keeps the behaviour of this one.init(may be null): called once, before the function is bound, with the node’sfn.-prefixed config keys, prefix removed, askey=value;.... Returns the ctx the function is called with, or null if the function cannot be configured. Catalyst’s frontend adds the controller’s message sizes asin_bytes=<n>andout_bytes=<n>, soinitmust accept both keys. A function may check them against what it processes and return null on a mismatch.fini(may be null): releases the ctxinitreturned, once the session using it has stopped.
The returned pointer must stay valid for the life of the library.