egg-thrift

0.1.2 • Public • Published

egg-thrift

Do not use this package in production, it's still not finished

NPM version build status Test coverage David deps Known Vulnerabilities npm download

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

MIT

TODO

  • compiler
  • app.thriftType
  • http server
  • http client
  • compiler test
  • app.thriftType test
  • http server test
  • http client test

Package Sidebar

Install

npm i egg-thrift

Weekly Downloads

0

Version

0.1.2

License

MIT

Last publish

Collaborators

  • jiangq