Commit 736aefeb448384f3c3133922fe104db38ddb2a27
Rename initalize/run
Alex Beregszaszi committed on 7/27/2017, 9:59:44 PMParent: abe94d07955c811f1fdb8e283515c3ec0309a104
Files changed
index.js | changed |
index.js | ||
---|---|---|
@@ -10,16 +10,16 @@ | ||
10 | 10 … | // In general, a root instance receives no message, but every other instance |
11 | 11 … | // receives a message with a singel port, which is a channel to its parent (aka the root). |
12 | 12 … | // |
13 | 13 … | // Optionally it can return a single value. |
14 | - async initialize (message) { | |
14 … | + async onCreation (message) { | |
15 | 15 … | throw new Error('Unimplemented initialiser') |
16 | 16 … | } |
17 | 17 … | |
18 | 18 … | // This is called for each incoming message the container gets. |
19 | 19 … | // |
20 | 20 … | // Optionally it can return a single value. |
21 | - async run (message) { | |
21 … | + async onMessage (message) { | |
22 | 22 … | throw new Error('Unimplemented message: ' + message.data) |
23 | 23 … | } |
24 | 24 … | |
25 | 25 … | // onIdle is called when there are no more immediate messages pending |
Built with git-ssb-web