egg-thrift
v0.1.2
Published
thrift plugin for egg
Downloads
3
Maintainers
Readme
egg-thrift
Do not use this package in production, it's still not finished
Install
$ npm i egg-thrift --save
Usage
// {app_root}/config/plugin.js
exports.thrift = {
enable: true,
package: 'egg-thrift',
};
Configuration
// {app_root}/config/config.default.js
exports.thrift = {
type: thriftType,
connectType: 'http',
defaultClient: {
transport,
protocol,
},
clients: {
'test.myTest': {
client: 'test.myTestClient',
host: 'localhost',
port: '7001',
options: {
path: '/thrift/test',
},
},
}
defaultService: {
transport,
protocol,
},
services: {
'/thrift/test': {
processor: thriftType.test.myTestServer,
handler: 'service.test',
},
},
};
see config/config.default.js for more detail.
Example
Questions & Suggestions
Please open an issue here.
License
TODO
- [ ] compiler
- [x]
app.thriftType
- [x] http server
- [x] http client
- [ ] compiler test
- [ ]
app.thriftType
test - [ ] http server test
- [ ] http client test