Skip to Content

Cat modes

CatMode is 'service' | 'api_candidate' | 'api'. It is stored on each RegistryEntry as mode.

Values

ModeTypical sourceMeaning
serviceClass or function without Express req/res shapeDomain / application RPC.
api_candidateHandler in an Express pipeline before the final handler, or cat with req+res but no explicit routeTreated as middleware in a pipeline until registerCatPipeline marks the last handler as api.
apiFinal pipeline handler, or cat(..., { route })Express endpoint; ApiReturn labels attach to this fnKey.

RPC and class instances

For style: 'class', executeRPC resolves the instance in order: explicit registerInstance, cached auto-singleton, or new Service() when the constructor was registered via @Cat / CatClass. If no instance is available and the method is not callable, the error label is NO_INSTANCE.

For style: 'function', the registered function is invoked directly—no instance step.

See Registration and RPC pipeline.