All notable changes to this project will be documented in this file. See Conventional Commits for commit guidelines.
0.17.0 (2020-04-02)
- Upgrade to using Hapi v20 (ad1c86). This requires services to operate on node > v12.
0.16.1 (2020-05-20)
- Injectable request object(370a0c)
0.16.0 (2020-01-21)
- Updated int64 to handle comparision between versions not sharing same prototype (80a5dd).
0.15.0 (2019-10-02)
- Updated hapi to the latest version to address snyk vulnerability, moving hapi to @hapi/hapi (fa3543)
0.14.6 (2019-09-05)
- Added blacklist to thrift-client (1cdf0a) (469af4)
- Added runtime check for types into binary protocol(9e5c1e)
0.14.0 (2019-08-09)
- Support for stripping header structs (60e84c)
0.13.5 (2019-03-28)
- Correct annotation types for thrift client (14a95a)
0.12.5 (2019-01-14)
- Correct an issue when path is incorrectly constructed (0377e1a)
0.12.0 (2019-01-11)
- Add support to
thrift-client
andthrift-server-hapi
to support endpoint-per-method (d85c58)
0.11.0 (2018-11-27)
- Splits plugins/middleware into their own packages (f5f344)
The APIs for plugins is unchanged. It's just that the plugins are no longer included with their given client/server.
For example if you want to include Zipkin tracing for thrift-client you know have to also install the zipkin-client-filter.
npm install --save @creditkarma/thrift-server-core
npm install --save @creditkarma/thrift-client
npm install --save @creditkarma/thrift-zipkin-core
npm install --save @creditkarma/zipkin-client-filter
And then use it as such:
import {
createHttpClient,
} from '@creditkaram/thrift-client'
import {
ThriftClientZipkinFilter,
} from '@creditkarma/thrift-client-zipkin-filter'
import { Calculator } from './codegen/calculator'
const thriftClient: Calculator.Client<ThriftContext<CoreOptions>> =
createHttpClient(Calculator.Client, {
hostName: 'localhost',
port: 8080,
register: [ ThriftClientZipkinFilter({
localServiceName: 'calculator-client',
remoteServiceName: 'calculator-service',
tracerConfig: {
endpoint: 'http://localhost:9411/api/v1/spans',
sampleRate: 0.1,
}
}) ]
})
- A new filter for client timing metrics (thrift-client-timing-filter)
0.10.0 (2018-11-16)
- Cleaned up format of Zipkin options (de5601f)
- Allow users to provide their own logging function (30f3793)
0.9.0 (2018-10-11)
- thrift-server-core: Add types for annotations (22804d)
0.8.0 (2018-08-16)
- Change the client plugin API so that the handler function expects two arguments (d4f38e)
The big change here is that the client middle ware object changed from this:
interface IThriftMiddlewareConfig<Options> {
methods?: Array<string>
handler(data: Buffer, context: ThriftContext<Options>, next: NextFunction<Options>): Promise<IRequestResponse>
}
To this:
interface IThriftClientFilterConfig<Options> {
methods?: Array<string>
handler(request: IThriftRequest<Options>, next: NextFunction<Options>): Promise<IRequestResponse>
}
The new IThriftRequest
object contains the outgoing payload on the data
property and the user-passed context on the context
property. Beyond this more data about the outgoing request is present, specifically the uri
and the service methodName
.
0.6.2 (2018-03-13)
- Bump peer dependencies (256bdce)
0.6.1 (2018-03-13)
- thrift-server-hapi: Fix naming of plugin (d288caf)
0.6.0 (2018-03-13)
0.5.1 (2018-03-12)
- Update peerDependencies (752728c)