0.2.0 • Published 5 years ago
ipc-node-go v0.2.0
ipc-node
This package is a simple IPC implementation between Node and its child process (Golang binary) using the stdin
/ stdout
as the transport.
- Installation
npm install ipc-node-go
#or
yarn add ipc-node-go
- Useage
const IPC = require('ipc-node-go')
//or
import IPC from 'ipc-node-go'
const ipc = new IPC('path-to-golang-bin')
// start the child process
let arg = ['some-flags', 'or-anything']
ipc.init(arg)
// send a message to go process
ipc.send('start-service', true)
//listen for and event
ipc.on('service-ready', someData => {
console.log(someData)
})
// send and get an acknoledgement via a callback
ipc.sendAndReceive('get-service-info', { id: 1 }, (error, data) => {
// do whatever you want
})
IPC is an EventEmitter.
MIT License
0.2.0
5 years ago
0.1.9
5 years ago
0.1.8
5 years ago
0.1.7
5 years ago
0.1.6
5 years ago
0.1.5
5 years ago
0.1.4
5 years ago
0.1.3
5 years ago
0.1.2
5 years ago
0.1.1
5 years ago
0.1.0
5 years ago
0.0.9
5 years ago
0.0.8
5 years ago
0.0.7
5 years ago
0.0.6
5 years ago
0.0.5
5 years ago
0.0.4
5 years ago
0.0.3
5 years ago
0.0.2
5 years ago
0.0.1
5 years ago