1 | /**
|
2 | * running/stopped state machine
|
3 | */
|
4 |
|
5 | var state = require('state');
|
6 |
|
7 | var Status = function(options) {
|
8 | this.initialize();
|
9 | return this;
|
10 | };
|
11 |
|
12 | Status.prototype.initialize = function() {
|
13 | // Applies an in-line state machine
|
14 | state(this, {
|
15 | Stopped: state('initial'),
|
16 | Running: state()
|
17 | });
|
18 | };
|
19 |
|
20 | module.exports = Status;
|