Commit 5f1ef8b77f428cd3ebef37c487314c5ef52acff2
Introduce onStartup
Alex Beregszaszi committed on 7/27/2017, 10:03:46 PMParent: 736aefeb448384f3c3133922fe104db38ddb2a27
Files changed
index.js | changed |
index.js | |||
---|---|---|---|
@@ -14,8 +14,15 @@ | |||
14 | 14 … | async onCreation (message) { | |
15 | 15 … | throw new Error('Unimplemented initialiser') | |
16 | 16 … | } | |
17 | 17 … | ||
18 … | + // This method runs when the container needs to be started up. It cannot be | ||
19 … | + // called before onCreation was successful. It can be called after a shutdown | ||
20 … | + // was requested in onIdle. | ||
21 … | + async onStartup () { | ||
22 … | + throw new Error('Unimplemented startup method') | ||
23 … | + } | ||
24 … | + | ||
18 | 25 … | // This is called for each incoming message the container gets. | |
19 | 26 … | // | |
20 | 27 … | // Optionally it can return a single value. | |
21 | 28 … | async onMessage (message) { |
Built with git-ssb-web