Skip to content

Commit

Permalink
Update scalafmt-core to 3.5.9 (#575)
Browse files Browse the repository at this point in the history
* Update scalafmt-core to 3.5.9

* Reformat with scalafmt 3.5.9

Executed command: scalafmt --non-interactive

* Add 'Reformat with scalafmt 3.5.9' to .git-blame-ignore-revs

* Delete unnecessary file .git-blame-ignore-revs

Co-authored-by: Michael Nedokushev <[email protected]>
  • Loading branch information
scala-steward and grouzen authored Sep 2, 2022
1 parent d077fff commit b893160
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = "3.5.8"
version = "3.5.9"
maxColumn = 120
align.preset = most
continuationIndent.defnSite = 2
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
package zio.telemetry.opentracing.example

import zhttp.service.server.ServerChannelFactory
import zhttp.service.{EventLoopGroup, Server, ServerChannelFactory}
import zhttp.service.{ EventLoopGroup, Server, ServerChannelFactory }
import zio.Console.printLine
import zio.config.getConfig
import zio.config.magnolia._
import zio.config.typesafe.TypesafeConfig
import zio.telemetry.opentracing.example.JaegerTracer.makeService
import zio.telemetry.opentracing.example.config.AppConfig
import zio.telemetry.opentracing.example.http.BackendApp
import zio.{ZIO, ZIOAppDefault}
import zio.{ ZIO, ZIOAppDefault }

object BackendServer extends ZIOAppDefault {

Expand All @@ -18,16 +18,16 @@ object BackendServer extends ZIOAppDefault {
val server: ZIO[AppEnv, Throwable, Unit] =
ZIO.scoped[AppEnv] {
for {
conf <- getConfig[AppConfig]
conf <- getConfig[AppConfig]
tracingService = makeService(conf.tracer.host, "zio-backend")
server = Server.port(conf.backend.port) ++ Server.app(BackendApp.status(tracingService))
_ <- server.make
_ <- printLine(s"BackendServer started at ${conf.backend.port}") *> ZIO.never
server = Server.port(conf.backend.port) ++ Server.app(BackendApp.status(tracingService))
_ <- server.make
_ <- printLine(s"BackendServer started at ${conf.backend.port}") *> ZIO.never
} yield ()
}

val configLayer = TypesafeConfig.fromResourcePath(descriptor[AppConfig])
val appLayer = ServerChannelFactory.auto ++ EventLoopGroup.auto(0)
val appLayer = ServerChannelFactory.auto ++ EventLoopGroup.auto(0)

override def run =
ZIO.provideLayer(configLayer >+> appLayer)(server.exitCode)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ package zio.telemetry.opentracing.example

import sttp.model.Uri
import zhttp.service.server.ServerChannelFactory
import zhttp.service.{EventLoopGroup, Server, ServerChannelFactory}
import zhttp.service.{ EventLoopGroup, Server, ServerChannelFactory }
import zio.Console.printLine
import zio.config.getConfig
import zio.config.magnolia._
import zio.config.typesafe.TypesafeConfig
import zio.telemetry.opentracing.example.JaegerTracer.makeService
import zio.telemetry.opentracing.example.config.AppConfig
import zio.telemetry.opentracing.example.http.ProxyApp
import zio.{ZIO, ZIOAppDefault}
import zio.{ ZIO, ZIOAppDefault }

object ProxyServer extends ZIOAppDefault {

Expand All @@ -24,12 +24,13 @@ object ProxyServer extends ZIOAppDefault {
val server: ZIO[AppEnv, Throwable, Unit] =
ZIO.scoped[AppEnv] {
for {
conf <- getConfig[AppConfig]
backendUrl <- ZIO.fromEither(Uri.safeApply(conf.backend.host, conf.backend.port)).mapError(new IllegalArgumentException(_))
service = makeService(conf.tracer.host, "zio-proxy")
server = Server.port(conf.proxy.port) ++ Server.app(ProxyApp.statuses(backendUrl, service))
_ <- server.make
_ <- printLine(s"ProxyServer started on ${conf.proxy.port}") *> ZIO.never
conf <- getConfig[AppConfig]
backendUrl <-
ZIO.fromEither(Uri.safeApply(conf.backend.host, conf.backend.port)).mapError(new IllegalArgumentException(_))
service = makeService(conf.tracer.host, "zio-proxy")
server = Server.port(conf.proxy.port) ++ Server.app(ProxyApp.statuses(backendUrl, service))
_ <- server.make
_ <- printLine(s"ProxyServer started on ${conf.proxy.port}") *> ZIO.never
} yield ()
}

Expand Down

0 comments on commit b893160

Please sign in to comment.