The MeshFlow Client service is functionally equivalent to the Temporal Client service. Start a new workflow execution by calling workflow.start on the client instance

//client.ts
import { MeshFlow, HotMesh } from '@hotmeshio/hotmesh';
import Redis from 'ioredis';

async function run(): Promise<string> {
const client = new MeshFlow.Client({
connection: {
class: Redis,
options: { host: 'localhost', port: 6379 }
}
});

const handle = await client.workflow.start({
args: ['HotMesh'],
taskQueue: 'default',
workflowName: 'example',
workflowId: HotMesh.guid()
});

return await handle.result();
//returns ['Hello HotMesh', '¡Hola, HotMesh!']
}

Properties

Methods

Properties

workflow: ClientWorkflow = ...

The MeshFlow Client service is functionally equivalent to the Temporal Client service. Starting a workflow is the primary use case and is accessed by calling workflow.start().

Methods

  • Any point of presence can be used to deploy and activate the HotMesh distributed executable to the active quorum.

    Parameters

    • namespace: string = APP_ID
    • version: string = APP_VERSION

    Returns Promise<void>