This is an automated email from the ASF dual-hosted git repository.
fanningpj pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-pekko-samples.git
The following commit(s) were added to refs/heads/main by this push:
new bf13400 rework implicits in grpc sample (#14)
bf13400 is described below
commit bf134005647b1aa56e57185faa683c43869df2ab
Author: PJ Fanning <[email protected]>
AuthorDate: Mon Mar 20 21:36:45 2023 +0100
rework implicits in grpc sample (#14)
---
.../main/scala/sample/cluster/client/grpc/ClusterClient.scala | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git
a/pekko-sample-cluster-client-grpc-scala/src/main/scala/sample/cluster/client/grpc/ClusterClient.scala
b/pekko-sample-cluster-client-grpc-scala/src/main/scala/sample/cluster/client/grpc/ClusterClient.scala
index 78a90ea..0772009 100644
---
a/pekko-sample-cluster-client-grpc-scala/src/main/scala/sample/cluster/client/grpc/ClusterClient.scala
+++
b/pekko-sample-cluster-client-grpc-scala/src/main/scala/sample/cluster/client/grpc/ClusterClient.scala
@@ -17,7 +17,7 @@ object ClusterClient {
*/
def props(
settings: ClusterClientSettings
- )(implicit materializer: Materializer, sys: ActorSystem): Props =
+ )(implicit materializer: Materializer): Props =
Props(new ClusterClient(settings))
sealed trait Command
@@ -49,8 +49,7 @@ object ClusterClient {
private def createClientStub(
settings: ClusterClientSettings
- )(implicit mat: Materializer, sys: ActorSystem):
ClusterClientReceptionistServiceClient = {
- implicit val ec: ExecutionContext = mat.executionContext
+ )(implicit sys: ActorSystem): ClusterClientReceptionistServiceClient = {
ClusterClientReceptionistServiceClient(settings.grpcClientSettings)
}
@@ -162,8 +161,7 @@ object ClusterClient {
* nature of the actors involved.
*/
final class ClusterClient(settings: ClusterClientSettings)(
- implicit materializer: Materializer,
- sys: ActorSystem
+ implicit materializer: Materializer
) extends Actor
with ActorLogging {
@@ -172,7 +170,7 @@ final class ClusterClient(settings: ClusterClientSettings)(
val serialization = new ClusterClientSerialization(context.system)
private val receptionistServiceClient
- : ClusterClientReceptionistServiceClient = createClientStub(settings)
+ : ClusterClientReceptionistServiceClient =
createClientStub(settings)(context.system)
// Original sender -> stream Source.actorRef of the session
private var sessionRef: Map[ActorRef, Future[ActorRef]] = Map.empty
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]