createSynclet
Essential
The createSynclet function wires the provided components, implementations, and options into a fully configured Synclet instance.
createSynclet<Depth, DataConnectorType, MetaConnectorType>(
components?: SyncletComponents<Depth, DataConnectorType, MetaConnectorType>,
implementations?: SyncletImplementations<Depth>,
options?: SyncletOptions,
): Promise<Synclet<Depth, DataConnectorType, MetaConnectorType>>| Type | Description | |
|---|---|---|
components? | SyncletComponents<Depth, DataConnectorType, MetaConnectorType> | |
implementations? | SyncletImplementations<Depth> | |
options? | SyncletOptions | |
| returns | Promise<Synclet<Depth, DataConnectorType, MetaConnectorType>> |
This is the primary factory function for creating a Synclet. It accepts three optional parameters: components (data/meta connectors and transports), implementation callbacks (lifecycle hooks and permission filters), and configuration options (ID and logger).
The function returns a Promise that resolves to a Synclet instance. The Synclet will use memory-based connectors and transport by default if none are provided, making it simple to start with a basic configuration and add persistence later.
Since
v0.0.0