Skip to content

Commit

Permalink
finagle-thrift: Fill in ServiceClass stack param on clients and servers
Browse files Browse the repository at this point in the history
Problem

Thrift's `ServiceClass` stack param is generally useful outside of Finagle's own codebase. Modules developed
externally may need access to this stack param, which is currently package-private.

Solution

Make `ServiceClass` stack param public.

JIRA Issues: CSL-10941

Differential Revision: https://phabricator.twitter.biz/D676781
  • Loading branch information
vkostyukov authored and jenkins committed May 26, 2021
1 parent bda281a commit 04a2de2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ New Features
* finagle-netty4: Added a new counter to keep track of the number of TLS connections that were
started via snooping. ``PHAB_ID=D667652``

* finagle-thrift: Thrift(Mux) clients and servers now fill in a `c.t.f.Thrift.param.ServiceClass`
stack param with the runtime class corresponding to a IDL-generated service stub.
``PHAB_ID=D676781``

Breaking API Changes
~~~~~~~~~~~~~~~~~~~~

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ object Thrift
val default = PerEndpointStats(false)
}

private[finagle] final case class ServiceClass(clazz: Option[Class[_]])
private[finagle] implicit object ServiceClass extends Stack.Param[ServiceClass] {
final case class ServiceClass(clazz: Option[Class[_]])
implicit object ServiceClass extends Stack.Param[ServiceClass] {
val default = ServiceClass(None)
}
}
Expand Down

0 comments on commit 04a2de2

Please sign in to comment.