0.1.2 • Published 7 years ago

egg-thrift v0.1.2

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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