@procwire/core
@procwire/core - Core module system for Procwire binary protocol.
This package provides the Module class for defining and communicating with worker processes using the binary data plane.
Example
Section titled “Example”import { Module } from '@procwire/core';import { msgpackCodec, arrowCodec } from '@procwire/codecs';
// Define a moduleconst worker = new Module('worker') .executable('python', ['worker.py']) .method('process', { codec: msgpackCodec }) .method('batch', { codec: arrowCodec, response: 'stream' }) .event('progress');
// After manager.spawn():const result = await worker.send('process', data);
for await (const chunk of worker.stream('batch', items)) { console.log(chunk);}
worker.onEvent('progress', (p) => console.log(`${p}%`));Classes
Section titled “Classes”Interfaces
Section titled “Interfaces”- DualCodecMethodConfig
- EventConfig
- ExecutableConfig
- InitMessage
- MethodConfig
- ModuleSchema
- RestartLimitConfig
- SingleCodecMethodConfig
- SpawnPolicy
- TypedEventConfig
Type Aliases
Section titled “Type Aliases”- AddEvent
- AddMethod
- AddMethodSymmetric
- ManagerEvent
- MethodsWithoutResponseType
- MethodsWithResponseType
- ModuleEvent
- ModuleState
- ResponseType
- RetryDelayConfig
- Schema
- SendReturn
Variables
Section titled “Variables”References
Section titled “References”ChildEventType
Section titled “ChildEventType”Renames and re-exports Schema
ChildRequestType
Section titled “ChildRequestType”Renames and re-exports Schema
ChildResponseType
Section titled “ChildResponseType”Renames and re-exports Schema
EmptySchema
Section titled “EmptySchema”Renames and re-exports Schema
EventDescriptor
Section titled “EventDescriptor”Renames and re-exports Schema
ExtractSchema
Section titled “ExtractSchema”Renames and re-exports Schema
InferCodecInput
Section titled “InferCodecInput”Renames and re-exports Schema
InferCodecOutput
Section titled “InferCodecOutput”Renames and re-exports Schema
MethodDescriptor
Section titled “MethodDescriptor”Renames and re-exports Schema
ParentEventType
Section titled “ParentEventType”Renames and re-exports Schema
ParentRequestType
Section titled “ParentRequestType”Renames and re-exports Schema
ParentResponseType
Section titled “ParentResponseType”Renames and re-exports Schema