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.
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
Provides a com.twitter.finagle.thrift.ClientId binding with a value configurable via a com.twitter.app.Flag.
Flags