Skip to content

Commit 2dc5301

Browse files
committed
Reorganize httpClient definition in Dependencies.scala
1 parent f9aca1b commit 2dc5301

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/client_server/src/main/scala/examples/client_server/Dependencies.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,6 @@ class Dependencies(using AllocatorIO) {
3333
ElizaServiceFs2Grpc.bindServiceResource[IO](elizaServiceImpl)
3434
}
3535

36-
lazy val httpClient: org.http4s.client.Client[IO] = allocate {
37-
EmberClientBuilder.default[IO].build
38-
}
39-
4036
lazy val httpServerApp: org.http4s.HttpApp[IO] = allocate {
4137
ConnectHttp4sRouteBuilder.forService[IO](elizaServiceGrpcServerDefinition).build
4238
}
@@ -51,6 +47,10 @@ class Dependencies(using AllocatorIO) {
5147

5248
// CLIENT DEPENDENCIES -------------------------------------------
5349

50+
lazy val httpClient: org.http4s.client.Client[IO] = allocate {
51+
EmberClientBuilder.default[IO].build
52+
}
53+
5454
// `Channel` is a gRPC term describing a connection to a server.
5555
// Both fs2-grpc and ZIO-gRPC accept Channels in their clients to communicate with a server.
5656
lazy val connectRpcChannel: io.grpc.Channel = allocate {

0 commit comments

Comments
 (0)