Skip to content

Commit 6c4e564

Browse files
authored
Merge pull request #147 from vaslabs/scala-steward/update/akka-http-10.2.0
Scala steward/update/akka http 10.2.0
2 parents b21dcac + d641441 commit 6c4e564

File tree

4 files changed

+5
-10
lines changed

4 files changed

+5
-10
lines changed

gateway/src/main/scala/talos/gateway/EndpointResolver.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ object EndpointResolver {
1111

1212
def transformRequest(request: HttpRequest, hitEndpoint: HitEndpoint): IO[HttpRequest] = IO {
1313
request
14-
.copy(uri = request.uri.withHost(hitEndpoint.service).withPath(Path(hitEndpoint.targetPath))
14+
.withUri(uri = request.uri.withHost(hitEndpoint.service).withPath(Path(hitEndpoint.targetPath))
1515
.withPort(hitEndpoint.port)).withHeaders(request.headers.filterNot(_.name == "Timeout-Access"))
1616
}
1717

gateway/src/main/scala/talos/gateway/ExecutionApi.scala

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ object ExecutionApi {
6666

6767

6868
private def hostConnectionPoolConfig(maxInflightRequests: Int)(implicit actorSystem: ActorSystem[_]): ConnectionPoolSettings =
69-
ConnectionPoolSettings.default(actorSystem.toClassic)
69+
ConnectionPoolSettings.default(actorSystem)
7070
.withMinConnections(1 + maxInflightRequests / 4)
7171
.withMaxConnections(maxInflightRequests)
7272
.withMaxOpenRequests(maxInflightRequests * 4)
@@ -90,8 +90,6 @@ object ExecutionApi {
9090
val fromServices = gatewayConfig.services.map {
9191
service =>
9292

93-
implicit val classicSystem = actorSystem.toClassic
94-
9593
val poolClientFlow = Http().cachedHostConnectionPool[Promise[HttpResponse]](
9694
service.host,
9795
service.port,

gateway/src/main/scala/talos/gateway/GatewayServer.scala

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
package talos.gateway
22

33
import akka.actor.typed.scaladsl.ActorContext
4-
import akka.actor.typed.scaladsl.adapter._
54
import akka.http.scaladsl.Http
6-
import akka.stream.Materializer
75
import kamon.Kamon
86
import talos.gateway.config.GatewayConfig
97

@@ -15,13 +13,12 @@ class GatewayServer private(gatewayConfig: GatewayConfig)(implicit actorContext:
1513

1614
private[gateway] val start: Future[Http.ServerBinding] = {
1715
val gateway = Gateway(gatewayConfig)(actorContext)
18-
implicit val materializer = Materializer(actorContext)
1916
import scala.concurrent.ExecutionContext.Implicits._
2017

21-
implicit val actorSystem = actorContext.system.toClassic
18+
implicit val actorSystem = actorContext.system
2219

2320
for {
24-
serverBinding <- Http().bindAndHandle(gateway.route, gatewayConfig.interface, gatewayConfig.port)
21+
serverBinding <- Http().newServerAt(gatewayConfig.interface, gatewayConfig.port).bind(gateway.route)
2522
} yield serverBinding
2623
}
2724

project/Dependencies.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ object Dependencies {
1515
val circe = "0.13.0"
1616
val kamon = "2.1.4"
1717
val scalatest = "3.0.8"
18-
val akkaHttp = "10.1.12"
18+
val akkaHttp = "10.2.0"
1919
val monix = "3.2.2"
2020
val gatling = "3.1.0"
2121
val wiremock = "2.27.1"

0 commit comments

Comments
 (0)