Changelog
=========

# v1.7.0 (2017-08-04)

* Cancel the context on incoming calls if the client connection is closed.
* Add `WithoutHeaders` to remove TChannel keys from a context.

# v1.6.0 (2017-06-02)

* Locks Apache Thrift to version 0.9.3, 0.10.0 to maintain backward-compatibility.
* Add `OnPeerStatusChanged` channel option to receive a notification each time
  the number of available connections changes for any given peer.
* Set DiffServ (QoS) bit on outbound connections.
* Improve resilience of the frame parser.

# v1.5.0 (2017-03-21)

* Add `PeerList.Len` to expose the number of peers in the peer list.
* Add `PeerList.GetNew` to only return previously unselected peers.

# v1.4.0 (2017-03-01)

* Add version information to the channel's LocalPeerInfo.
* Add peers package for peer management utilities such as
  consistent peer selection.
* Fix SetScoreStrategy not rescoring existing peers. (#583).

# v1.3.0 (2017-02-01)

* Exposes the channel's RootPeerList with `channel.RootPeers()`.
* Support Thrift namespaces for thrift-gen.

# v1.2.3 (2017-01-19)

* Improve error messages when an argument reader is closed without
  reading the EOF. (#567)
* thrift: Fix an issue where we return `nil` if we expected a Thrift exception
  but none was found (e.g., exception is from the future). (#566)
* Fix ListenIP selecting docker interfaces over physical networks. (#565)
* Fix for error when a Thrift payload has completed decoding and attempts
  to close the argument reader without waiting until EOF.  (#564)
* thrift-gen: Fix "namespace go" being ignored even though the Apache thrift
  generated code was respecting it. (#559)

# v1.2.2 (2016-12-21)

* Add a unique channel ID for introspection (#548)
* Don't drop existing headers on a context when using Wrap(ctx) (#547)
* Setting response headers is not goroutine safe, allow using a child context
  for parallel sub-requests (#549).
* Fix context cancellation not cancelling Dial attempts (#541)
* Expose local peer information on {Inbound,Outbound}Call (#537)
* Only select active connections for calls (#521)
* Add remote peer info to connection logger and introspection (#514)
* Treat hostPorts ending in ":0" in the init headers as ephemeral (#513)

# v1.2.1 (2016-09-29)

* Fix data race on headers when making concurrent calls using the same context. (#505)

# v1.2.0 (2016-09-15)

* Adds support for routing keys (the TChannel rk transport header).

# v1.1.0 (2016-08-25)

* Integrate OpenTracing for distributed tracing and context propagation.
  As long as a Zipkin-style tracing is configured, TChannel frames still
  send tracing information, and `CurrentSpan(ctx)` works as before.
  All tracer configuration must be handled through OpenTracing.
  (#426)
* Improve error messages when using the json package and the host:port
  fails to connect. (#475)
* mockhyperbahn now using inbuilt TChannel relaying to implement in-process
  forwarding. (#472)
* Drop go1.4 support and add support for go1.7.
* Pass thrift.Context to the thrift.Server's response callback (#465)

# 1.0.9 (2016-07-20)

* Expose meta endpoints on the "tchannel" service name. (#459)
* Add Go version and tchannel-go library version to introspection. (#457)
* Better handling of peers where dialed host:port doesn't match the remote
  connection's reported host:port. (#452)
* Expose the number of connections on a channel. (#451)

# 1.0.8 (2016-07-15)

* Remove dependency on "testing" from "tchannel-go" introduced in v1.0.7.

# 1.0.7 (2016-07-15)

* Add CallOptions() to IncomingCall which can be used as the call option
  when making outbound calls to proxy all transport headers.
* Add tracing information to all error frames generated by the library.
* Add GetHandlers for getting all registered methods on a subchannel.
* Fix peer score not being calculated when adding a new outbound connections
* Expose the peer information for outbound calls.
* Support a separate connection timeout from the context timeout, useful for
  streaming calls where the stream timeout may be much longer than the
  connection timeout.

# 1.0.6 (2016-06-16)

* Fix trace span encoding fields in the wrong order

# 1.0.5 (2016-04-04)

* Use `context.Context` storage for headers so `thrift.Context` and
  `tchannel.ContextWithHeaders` can be passed to functions that use
  `context.Context`, and have them retain headers.
* `thrift.Server` allows a custom factory to be used for `thrift.Context`
  creation based on the underlying `context.Context` and headers map.
* Store goroutine stack traces on channel creation that can be accessed
  via introspection.

# 1.0.4 (2016-03-09)

* Improve handling of network failures during pending calls. Previously, calls
  would timeout, but now they fail as soon as the network failure is detected.
* Remove ephemeral peers with closed outbound connections.
* #233: Ensure errors returned from Thrift handlers have a non-nil value.
* #228: Add registered methods to the introspection output.
* Add ability to set a global handler for a SubChannel.

# 1.0.3 (2016-02-15)

* Improved performance when writing Thrift structs
* Make closing message exchanges less disruptive, changes a panic due to
  closing a channel twice to an error log.
* Introspection now includes information about all channels created
  in the current process.

# 1.0.2 (2016-01-29)

* Extend the `ContextBuilder` API to support setting the transport-level
  routing delegate header.
* Set a timeout when making new outbound connections to avoid hanging.
* Fix for #196: Make the initial Hyperbahn advertise more tolerant of transient
  timeouts.
* Assorted logging and test improvements.

# 1.0.1 (2016-01-19)

* Bug fix for #181: Shuffle peers on PeerList.Add to avoid biases in peer
  selection.
* Peers can now be removed using PeerList.Remove.
* Add ErrorHandlerFunc to create raw handlers that return errors.
* Retries try to avoid previously selected hosts, rather than just the
  host:port.
* Create an ArgReader interface (which is an alias for io.ReadCloser) for
  symmetry with ArgWriter.
* Add ArgReadable and ArgWritable interfaces for the common methods between
  calls and responses.
* Expose Thrift binary encoding methods (thrift.ReadStruct, thrift.WriteStruct,
  thrift.ReadHeaders, thrift.WriteHeaders) so callers can easily send Thrift
  payloads over the streaming interface.

# 1.0.0 (2016-01-11)

* First stable release.
* Support making calls with JSON, Thrift or raw payloads.
* Services use thrift-gen, and implement handlers with a `func(ctx, arg) (res,
  error)` signature.
* Support retries.
* Peer selection (peer heap, prefer incoming strategy, for use with Hyperbahn).
* Graceful channel shutdown.
* TCollector trace reporter with sampling support.
* Metrics collection with StatsD.
* Thrift support, including includes.
