# reliable-events

> reliable events

Latest version **0.1.5** (published 2016-10-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install reliable-events
pnpm add reliable-events
yarn add reliable-events
bun add reliable-events
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.5 |
| Published | 2016-10-24 |
| First published | 2016-09-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | ygch1993@gmail.com |
| Maintainers | brunoyang |
| Keywords | reliable, events |

## Links

- npm: https://www.npmjs.com/package/reliable-events
- Repository: https://github.com/reliablejs/reliable-events
- Homepage: https://github.com/reliablejs/reliable-events#readme
- Issues: https://github.com/reliablejs/reliable-events/issues
- npm.io page: https://npm.io/package/reliable-events

## Dependencies (1)

- [reliable-logger](https://npm.io/package/reliable-logger.md) ^1.0.11

## Alternatives

- [async-exit-hook](https://npm.io/package/async-exit-hook.md) — 3.7M weekly downloads
- [evnty](https://npm.io/package/evnty.md) — 7.2K weekly downloads
- [eleventy-plugin-asciidoc](https://npm.io/package/eleventy-plugin-asciidoc.md) — 3.5K weekly downloads
- [@jswork/next-get2get](https://npm.io/package/@jswork/next-get2get.md) — 945 weekly downloads
- [@dashersw/axon](https://npm.io/package/@dashersw/axon.md) — 934 weekly downloads

## Recent versions

- 0.1.5 (latest) — 2016-10-24
- 0.1.4 — 2016-09-30
- 0.1.3 — 2016-09-30
- 0.1.2 — 2016-09-29
- 0.1.1 — 2016-09-29
- 0.1.0 — 2016-09-28

## README

# reliable-events

## Install

```shell
npm install reliable-events
```

## Usage
```js
const events = require('reliable-events');

const msg = {
  message: 'lostSlave',
  data: {}
};

// dispatch message to main process
events.sendToMaster(msg);

// dispatch message to all cluster form main process
events.sendToAllCluster(msg);

// randomly dispatch message to a cluster form main process
events.sendToSingleCluster(msg);


// events
events.EVENTS.LOST_SLAVE; // lost connection to reliable-slave
events.EVENTS.SLAVE_ONLINE;  // reliable-slave online
events.EVENTS.TASK_END; // task end
events.EVENTS.TASK_FAILED; // task failed
events.EVENTS.SUB_TASK_END; // subtask end (subtask means a task has different language version)
events.EVENTS.SUB_TASK_FAILED; // task failed
```

## License

MIT

---
_Source: https://npm.io/package/reliable-events · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
