Last active
May 8, 2017 10:47
-
-
Save kianenigma/a9047b6ee0df5412ff1b3b2559922469 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const XYZ = require('xyz-core') | |
let ms = new XYZ({ | |
selfConf: { | |
name: 'client.ms', | |
transport: [{type: 'HTTP', port: 5000}], | |
host: '127.0.0.1' | |
} | |
}) | |
setInterval(() => { | |
ms.call({ | |
servicePath: 'task/cpu' | |
}, (err, body) => { | |
console.log(`task/cpu response: ${err} ${body}`) | |
}) | |
}, 100) | |
setInterval(() => { | |
ms.call({ | |
servicePath: 'task/io' | |
}, (err, body) => { | |
console.log(`task/io response: ${err} ${body}`) | |
}) | |
}, 500) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment