{"library":"mongo-leader","type":"library","category":null,"description":"A Node.js library for MongoDB-backed leader election, inspired by redis-leader. Current stable version is 1.6.7, with regular releases. It extends EventEmitter to emit 'elected' and 'revoked' events when leadership status changes. Key differentiators: automatic TTL index handling (since 1.5.0) avoids IndexOptionsConflict on config changes; supports lazy start and polling; minimal dependencies. Compared to alternatives like node-zookeeper-leader or redis-leader, it leverages MongoDB's existing infrastructure.","language":"javascript","status":"active","version":"1.6.7","tags":["javascript","mongodb","leader","election","leader election","mongo leader","mongo-leader","mongo election","mongo-election"],"last_verified":"Fri Jun 05","install":[{"cmd":"npm install mongo-leader","imports":["import { Leader } from 'mongo-leader'","import type { LeaderOptions } from 'mongo-leader'","import { LeaderEvent } from 'mongo-leader'"]},{"cmd":"yarn add mongo-leader","imports":[]},{"cmd":"pnpm add mongo-leader","imports":[]}],"homepage":"https://github.com/andrewmolyuk/mongo-leader#readme","github":"https://github.com/andrewmolyuk/mongo-leader","docs":null,"changelog":null,"pypi":null,"npm":"mongo-leader","openapi_spec":null,"status_page":null,"smithery":null,"compatibility":null}