| const IgniteClient = require('apache-ignite-client'); | |
| const igniteClient = new IgniteClient(onStateChanged); | |
| function onStateChanged(state, reason) { | |
| if (state === IgniteClient.STATE.CONNECTED) { | |
| console.log('Client is started'); | |
| } | |
| else if (state === IgniteClient.STATE.DISCONNECTED) { | |
| console.log('Client is stopped'); | |
| if (reason) { | |
| console.log(reason); | |
| } | |
| } | |
| } |