package modules
- Alphabetic
- Public
- All
Type Members
-
class
ThriftClientIdModule extends TwitterModule
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.
- See also
-
abstract
class
ThriftClientModule[ThriftService] extends TwitterModule with ThriftClientModuleTrait
A TwitterModule allows users to configure a Finagle
ThriftMuxclient and does NOT provide ability to filter or configure per-method Scrooge-generated interfaces.A TwitterModule allows users to configure a Finagle
ThriftMuxclient and does NOT provide ability to filter or configure per-method Scrooge-generated interfaces. The client interface can be expressed as aMethodPerEndpointor higher-kinded interface.Provides bindings for a Scrooge-generated
MethodPerEndpointor higher-kinded interface.See the ThriftMethodBuilderClientModule for building a
ThriftMuxclient that allows for filtering and configuration per-method of the Scrooge-generated interface.- ThriftService
A Scrooge-generated
MethodPerEndpointor the higher-kinded type of the Scrooge-generated service, e.g.,MyService[Future].
- Note
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.
- See also
String, label: String)
-
abstract
class
ThriftMethodBuilderClientModule[ServicePerEndpoint <: Filterable[ServicePerEndpoint], MethodPerEndpoint] extends TwitterModule with ThriftClientModuleTrait
A TwitterModule which allows for configuration of a
ThriftMuxclient.A TwitterModule which allows for configuration of a
ThriftMuxclient. The client interface can be expressed as aservice-per-endpointor aMethodPerEndpoint.Provides bindings for a Scrooge-generated
service-per-endpointandMethodPerEndpoint. TheMethodPerEndpointis constructed via the MethodPerEndpointBuilder and is thus implemented as a thin wrapper over theservice-per-endpoint.This TwitterModule allows users to configure and filter a Scrooge-generated
service-per-endpointper-method which can then be used directly or can be wrapped by aMethodPerEndpoint.- ServicePerEndpoint
A Scrooge-generated ServicePerEndpoint
- MethodPerEndpoint
A Scrooge-generated MethodPerEndpoint
- Note
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.
,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.
- See also
-
abstract
class
FilteredThriftClientModule[FutureIface <: ThriftService, ServiceIface <: Filterable[ServiceIface]] extends TwitterModule
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 callingThrift.Client.newMethodIface(...); as opposed to the functionally equivalentRemoteService.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))
- Annotations
- @deprecated
- Deprecated
(Since version 2018-01-08) Use the com.twitter.inject.thrift.modules.ThriftMethodBuilderClientModule
- See also
com.twitter.finagle.thrift.MethodIfaceBuilder
Value Members
- object AndThenServiceModule extends TwitterModule
- object FilteredThriftClientModule
- object ThriftClientIdModule extends ThriftClientIdModule
Deprecated Value Members
-
object
FilteredThriftClientFlagsModule extends TwitterModule
- Annotations
- @deprecated
- Deprecated
(Since version 2018-01-08) No replacement. Timeouts can be manipulated with Tunables