Skip to content

Documentation / @agentick/client-multiplexer / createLeaderElector

Function: createLeaderElector() ​

createLeaderElector(channelName): LeaderElector

Defined in: client-multiplexer/src/leader-elector.ts:20

Create a leader elector for the given channel name. Uses Web Locks API (instant) with BroadcastChannel fallback.

Parameters ​

channelName ​

string

Returns ​

LeaderElector

Released under the ISC License.