A com.twitter.inject.TwitterModule which configures and binds a JavaDarkTrafficFilter to the object graph.
A com.twitter.inject.TwitterModule which configures and binds a DarkTrafficFilter to the object graph.
A com.twitter.inject.TwitterModule which configures and binds a DarkTrafficFilter to the object graph.
This is only applicable in Scala as it uses generated Scala classes and expects to configure the DarkTrafficFilter over a com.twitter.finagle.Service that is generated from Finagle via generated Scala code. Users of generated Java code should use the JavaDarkTrafficFilterModule.
,This DarkTrafficFilter module is to be used with Controllers
which are constructed by
extending Controller(GeneratedThriftService)
. For Controllers that are constructed using
the deprecated method of extending Controller with GeneratedThriftService.BaseServiceIface
,
Use the DarkTrafficFilterModule above.
Provides a com.twitter.finagle.thrift.ClientId binding with a value configurable via a com.twitter.app.Flag.
Provides a com.twitter.finagle.thrift.ClientId binding with a value configurable via a com.twitter.app.Flag.
A TwitterModule allows users to configure a Finagle ThriftMux
client and does NOT
provide ability to filter or configure per-method Scrooge-generated interfaces.
A TwitterModule allows users to configure a Finagle ThriftMux
client and does NOT
provide ability to filter or configure per-method Scrooge-generated interfaces. The client
interface can be expressed as a MethodPerEndpoint
or higher-kinded interface.
Provides bindings for a Scrooge-generated MethodPerEndpoint
or higher-kinded interface.
See the ThriftMethodBuilderClientModule for building a ThriftMux
client that allows for filtering
and configuration per-method of the Scrooge-generated interface.
A Scrooge-generated MethodPerEndpoint
or the higher-kinded type of the
Scrooge-generated service, e.g., MyService[Future]
.
This TwitterModule expects a com.twitter.finagle.thrift.ClientId to be bound to the object graph but does not assume how it is done. A com.twitter.finagle.thrift.ClientId can be bound by including the ThriftClientIdModule in your server configuration.
String, label: String)
A TwitterModule which allows for configuration of a ThriftMux
client.
A TwitterModule which allows for configuration of a ThriftMux
client. The client interface
can be expressed as a service-per-endpoint
or a MethodPerEndpoint
.
Provides bindings for a Scrooge-generated service-per-endpoint
and MethodPerEndpoint
. The
MethodPerEndpoint
is constructed via the MethodPerEndpointBuilder and is thus implemented
as a thin wrapper over the service-per-endpoint
.
This TwitterModule allows users to configure and filter a Scrooge-generated service-per-endpoint
per-method which can then be used directly or can be wrapped by a MethodPerEndpoint
.
A Scrooge-generated ServicePerEndpoint
A Scrooge-generated MethodPerEndpoint
This TwitterModule expects a com.twitter.finagle.thrift.ClientId to be bound to the object graph but does not assume how it is done. A com.twitter.finagle.thrift.ClientId can be bound by including the ThriftClientIdModule in your server configuration.
,When applying filters, filter order matters. The order in which filters are applied is the order in which requests will flow through to the service and the opposite of the order in which responses return. See the ThriftMethodBuilderFactory for more information.
A TwitterModule which configures and binds a DarkTrafficFilter to the object graph, for use with Controllers constructed using the legacy method.
A TwitterModule which configures and binds a DarkTrafficFilter to the object graph, for use with Controllers constructed using the legacy method.
(Since version 12-03-2019) Use ReqRepDarkTrafficFilterModule
This is only applicable in Scala as it uses generated Scala classes and expects to configure the DarkTrafficFilter over a com.twitter.finagle.Service that is generated from Finagle via generated Scala code. Users of generated Java code should use the JavaDarkTrafficFilterModule.
,This DarkTrafficFilter module is to be used with Controllers which are constructed using
the deprecated method of extending the BaseServiceIface
of the generated Thrift service.
For services that construct their Controllers by extending
Controller(GeneratedThriftService)
, use the ReqRepDarkTrafficFilter instead
Provides a FutureIface in the form of RemoteService[Future]
for making calls to a remote service.
Provides a FutureIface in the form of RemoteService[Future]
for making calls to a remote service. The FutureIface
(e.g., RemoteService[Future]) wraps a ServiceIface in which each method is implemented in the form of a com.twitter.finagle.Service
typed from com.twitter.scrooge.ThriftMethod.Args to com.twitter.scrooge.ThriftMethod.SuccessType.
A FutureIface of RemoteService[Future]
is used as this is the FutureIface type generated by Scrooge's
"services-per-endpoint" functionality e.g. the result of calling Thrift.Client.newMethodIface(...)
; as opposed to
the functionally equivalent RemoteService.FutureIface
.
To provide per-method filters to the ServiceIface provide an implementation of filterServiceIface and use the provided com.twitter.inject.thrift.filters.ThriftClientFilterBuilder to filter methods. E.g.,
serviceIface.copy( fetchBlob = filters.method(FetchBlob) .withMethodLatency .withExponentialRetry( shouldRetryResponse = PossiblyRetryableExceptions, start = 50.millis, multiplier = 2, retries = 3) .withRequestLatency .withRequestTimeout(500.millis) .withConcurrencyLimit( initialPermits = 100) .filtered(new MyFilter) .filtered[MyOtherFilter] .andThen(serviceIface.fetchBlob))
(Since version 2018-01-08) Use the com.twitter.inject.thrift.modules.ThriftMethodBuilderClientModule
com.twitter.finagle.thrift.MethodIfaceBuilder
(Since version 2018-01-08) No replacement. Timeouts can be manipulated with Tunables
A com.twitter.inject.TwitterModule which configures and binds a JavaDarkTrafficFilter to the object graph.
This is only applicable with code that uses generated Java classes as it expects to configure the JavaDarkTrafficFilter over a com.twitter.finagle.Service that is generated from Finagle via generated Java code. Users of generated Scala code should use the ReqRepDarkTrafficFilterModule.