The client name used when group isn't named.
The client name used when group isn't named.
The Stack.Params
to be used by this client.
The Stack.Params
to be used by this client.
Both defaultClientName and stats predate Stack.Params and as such are implemented separately.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$MethodPerEndpoint
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$MethodPerEndpoint
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$MethodPerEndpoint
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$MethodPerEndpoint
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$MethodPerEndpoint
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$MethodPerEndpoint
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
Create a new client of type ThriftServiceType
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$MethodPerEndpoint
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
Build client interfaces for multiplexed thrift services.
Build client interfaces for multiplexed thrift services.
E.g.
val client = Thrift.client.multiplex(address, "client") { client => new { val echo = client.newIface[Echo.FutureIface]("echo") val extendedEcho = client.newServiceIface[ExtendedEcho.ServiceIface]("extendedEcho") } } client.echo.echo("hello") client.extendedEcho.getStatus(ExtendedEcho.GetStatus.Args())
Build client interfaces for multiplexed thrift services.
Build client interfaces for multiplexed thrift services.
E.g.
val client = Thrift.client.multiplex(address, "client") { client => new { val echo = client.newIface[Echo.FutureIface]("echo") val extendedEcho = client.newServiceIface[ExtendedEcho.ServiceIface]("extendedEcho") } } client.echo.echo("hello") client.extendedEcho.getStatus(ExtendedEcho.GetStatus.Args())
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
E.g. given a Thrift service
service Logger { string log(1: string message, 2: i32 logLevel); i32 getLogSize(); }
you can construct a client interface with a Finagle Service per Thrift method:
val loggerService: Logger.ServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ServicePerEndpoint]("localhost:8000", "client_label") val response: String = loggerService.log(Logger.Log.Args("log message", 1))
You can also create a Finagle Service[scrooge.Request, scrooge.Response]
per-endpoint (method)
for a Scrooge-generated Thrift object.
E.g. given a Thrift service
service Logger { string log(1: string message, 2: i32 logLevel); i32 getLogSize(); }
you can construct a client interface with a Finagle Service per Thrift method that uses the Scrooge Request/Response envelopes:
val loggerService: Logger.ReqRepServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ReqRepServicePerEndpoint]("localhost:8000", "client_label") val response: c.t.scrooge.Response[String] = loggerService.log(c.t.scrooge.Request(Logger.Log.Args("log message", 1)))
This allows you to access any contained c.t.scrooge.Request
and c.t.scrooge.Response
headers.
Address of the service to connect to.
Assign a label for scoped stats.
The builder type is generated by Scrooge for a thrift service.
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
E.g. given a Thrift service
service Logger { string log(1: string message, 2: i32 logLevel); i32 getLogSize(); }
you can construct a client interface with a Finagle Service per Thrift method:
val loggerService: Logger.ServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ServicePerEndpoint]("localhost:8000", "client_label") val response: String = loggerService.log(Logger.Log.Args("log message", 1))
You can also create a Finagle Service[scrooge.Request, scrooge.Response]
per-endpoint (method)
for a Scrooge-generated Thrift object.
E.g. given a Thrift service
service Logger { string log(1: string message, 2: i32 logLevel); i32 getLogSize(); }
you can construct a client interface with a Finagle Service per Thrift method that uses the Scrooge Request/Response envelopes:
val loggerService: Logger.ReqRepServicePerEndpoint = Thrift.client.servicePerEndpoint[Logger.ReqRepServicePerEndpoint]("localhost:8000", "client_label") val response: c.t.scrooge.Response[String] = loggerService.log(c.t.scrooge.Request(Logger.Log.Args("log message", 1)))
This allows you to access any contained c.t.scrooge.Request
and c.t.scrooge.Response
headers.
Address of the service to connect to, in the format accepted by Resolver.eval
.
Assign a label for scoped stats.
The builder type is generated by Scrooge for a thrift service.
(Since version 2017-8-16) Use com.twitter.finagle.thrift.RichClientParam
Create a new client of type Iface
, which must be generated
by Scrooge.
Create a new client of type Iface
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$FutureIface
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
Create a new client of type Iface
, which must be generated
by Scrooge.
Create a new client of type Iface
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$FutureIface
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
Create a new client of type Iface
, which must be generated
by Scrooge.
Create a new client of type Iface
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$FutureIface
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
Create a new client of type Iface
, which must be generated
by Scrooge.
Create a new client of type Iface
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$FutureIface
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
Create a new client of type Iface
, which must be generated
by Scrooge.
Create a new client of type Iface
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$FutureIface
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
Create a new client of type Iface
, which must be generated
by Scrooge.
Create a new client of type Iface
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$FutureIface
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
Create a new client of type Iface
, which must be generated
by Scrooge.
Create a new client of type Iface
, which must be generated
by Scrooge.
For Scala generated code, the Class
passed in should be
either ServiceName$FutureIface
or ServiceName[Future]
.
For Java generated code, the Class
passed in should be
ServiceName$ServiceIface
.
(Since version 2017-11-20) Use com.twitter.finagle.ThriftRichClient#build
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
E.g. given a Thrift service
service Logger { string log(1: string message, 2: i32 logLevel); i32 getLogSize(); }
you can construct a client interface with a Finagle Service per Thrift method:
val loggerService: Logger.ServiceIface = Thrift.client.newServiceIface[Logger.ServiceIface]("localhost:8000", "client_label") val response: String = loggerService.log(Logger.Log.Args("log message", 1))
Address of the service to connect to.
Assign a label for scoped stats.
The builder type is generated by Scrooge for a thrift service.
(Since version 2017-11-13) Use com.twitter.finagle.ThriftRichClient#servicePerEndpoint[ServicePerEndpoint]
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
Construct a Finagle Service
interface for a Scrooge-generated Thrift object.
E.g. given a Thrift service
service Logger { string log(1: string message, 2: i32 logLevel); i32 getLogSize(); }
you can construct a client interface with a Finagle Service per Thrift method:
val loggerService: Logger.ServiceIface = Thrift.client.newServiceIface[Logger.ServiceIface]("localhost:8000", "client_label") val response: String = loggerService.log(Logger.Log.Args("log message", 1))
Address of the service to connect to, in the format accepted by Resolver.eval
.
Assign a label for scoped stats.
The builder type is generated by Scrooge for a thrift service.
(Since version 2017-11-13) Use com.twitter.finagle.ThriftRichClient#servicePerEndpoint[ServicePerEndpoint]
A mixin trait to provide a rich Thrift client API.