Skip to content

Documentation / @hybrid-compute/core / createHybridCompute

Function: createHybridCompute() ​

ts
function createHybridCompute(
  backends: HybridComputeOptionsInterface
): HybridCompute;

Defined in: packages/core/src/index.ts:274

Create a HybridCompute orchestrator: the usual way to start.

Parameters ​

backends ​

HybridComputeOptionsInterface

An object with at least one of the local, worker and remote backends.

Returns ​

HybridCompute

A new HybridCompute orchestrator.

Throws ​

If backends isn't an object, a backend lacks canRun or runTask, or no backend is given.

Throws ​

If backends has a key other than local, worker or remote.

Example ​

ts
const hybrid = createHybridCompute({ local: createLocalCompute() });