File tree Expand file tree Collapse file tree 3 files changed +3
-8
lines changed
gateway/src/main/scala/talos/gateway Expand file tree Collapse file tree 3 files changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -11,7 +11,7 @@ object EndpointResolver {
11
11
12
12
def transformRequest (request : HttpRequest , hitEndpoint : HitEndpoint ): IO [HttpRequest ] = IO {
13
13
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))
15
15
.withPort(hitEndpoint.port)).withHeaders(request.headers.filterNot(_.name == " Timeout-Access" ))
16
16
}
17
17
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ object ExecutionApi {
66
66
67
67
68
68
private def hostConnectionPoolConfig (maxInflightRequests : Int )(implicit actorSystem : ActorSystem [_]): ConnectionPoolSettings =
69
- ConnectionPoolSettings .default(actorSystem.toClassic )
69
+ ConnectionPoolSettings .default(actorSystem)
70
70
.withMinConnections(1 + maxInflightRequests / 4 )
71
71
.withMaxConnections(maxInflightRequests)
72
72
.withMaxOpenRequests(maxInflightRequests * 4 )
@@ -90,8 +90,6 @@ object ExecutionApi {
90
90
val fromServices = gatewayConfig.services.map {
91
91
service =>
92
92
93
- implicit val classicSystem = actorSystem.toClassic
94
-
95
93
val poolClientFlow = Http ().cachedHostConnectionPool[Promise [HttpResponse ]](
96
94
service.host,
97
95
service.port,
Original file line number Diff line number Diff line change 1
1
package talos .gateway
2
2
3
3
import akka .actor .typed .scaladsl .ActorContext
4
- import akka .actor .typed .scaladsl .adapter ._
5
4
import akka .http .scaladsl .Http
6
- import akka .stream .Materializer
7
5
import kamon .Kamon
8
6
import talos .gateway .config .GatewayConfig
9
7
@@ -15,10 +13,9 @@ class GatewayServer private(gatewayConfig: GatewayConfig)(implicit actorContext:
15
13
16
14
private [gateway] val start : Future [Http .ServerBinding ] = {
17
15
val gateway = Gateway (gatewayConfig)(actorContext)
18
- implicit val materializer = Materializer (actorContext)
19
16
import scala .concurrent .ExecutionContext .Implicits ._
20
17
21
- implicit val actorSystem = actorContext.system.toClassic
18
+ implicit val actorSystem = actorContext.system
22
19
23
20
for {
24
21
serverBinding <- Http ().newServerAt(gatewayConfig.interface, gatewayConfig.port).bind(gateway.route)
You can’t perform that action at this time.
0 commit comments