Home Reference Source Repository

Variable

Static Public Summary
public

Hardware stats plugin

public

Health check plugin

public

Subscriber stats plugin

public

sleep(delay: Number): Promise: *

Sleep function that returns a promise that will be resolved after given delay

Static Public

public HardwareStat: Object source

import HardwareStat from 'microwork/src/plugins/hardwarestat.js'

Hardware stats plugin

public HealthCheck: Object source

import HealthCheck from 'microwork/src/plugins/healthcheck.js'

Health check plugin

public SubscriberStats: Object source

import SubscriberStats from 'microwork/src/plugins/substats.js'

Subscriber stats plugin

public sleep(delay: Number): Promise: * source

import sleep from 'microwork/src/sleep.js'

Sleep function that returns a promise that will be resolved after given delay

Return:

Promise

Promise that will be resolved after delay

Example:

Promises example
doSomeThings()
	.then(() => sleep(100))
	.then(() => doOtherThings());
Async/await example
await doSomeThings();
await sleep(100);
await doOtherThings();