Skip to content

Commit

Permalink
Renaming Http4sBlazeClient to Http4sBlazeClientModule (#39)
Browse files Browse the repository at this point in the history
* Renaming Http4sBlazeClient to Http4sBlazeClientModule

* docs: Regenerate mdoc
  • Loading branch information
havelkahonza authored and mergify[bot] committed Oct 16, 2019
1 parent f45b34c commit 056a6db
Show file tree
Hide file tree
Showing 9 changed files with 16 additions and 16 deletions.
2 changes: 1 addition & 1 deletion docs/http4s.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ val resource = for {
executorModule <- ExecutorModule.makeDefault[Task]
console = ConsoleModule.make[Task]
server <- Http4sBlazeServerModule.make[Task](Http4sBlazeServerConfig("127.0.0.1", 0), routes, executorModule.executionContext)
client <- Http4sBlazeClient.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
client <- Http4sBlazeClientModule.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
} yield (server, client, console)

val program = resource
Expand Down
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ val resource = for {
executorModule <- ExecutorModule.makeDefault[Task]
console = ConsoleModule.make[Task]
server <- Http4sBlazeServerModule.make[Task](Http4sBlazeServerConfig("127.0.0.1", 0), routes, executorModule.executionContext)
client <- Http4sBlazeClient.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
client <- Http4sBlazeClientModule.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
} yield (server, client, console)

val program = resource
Expand Down
6 changes: 3 additions & 3 deletions docs/jvm.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,11 @@ val program = for {
console = ConsoleModule.make[Task]
_ <- console.printLine(s"Random number: $randomNumber")
} yield ()
// program: zio.ZIO[Any, Throwable, Unit] = zio.ZIO$FlatMap@159314ca
// program: zio.ZIO[Any, Throwable, Unit] = zio.ZIO$FlatMap@5e8684a3

val runtime = new DefaultRuntime {} // this is just needed in example
// runtime: AnyRef with DefaultRuntime = repl.Session$App$$anon$1@bafc754 // this is just needed in example
// runtime: AnyRef with DefaultRuntime = repl.Session$App$$anon$1@590ab84 // this is just needed in example
runtime.unsafeRun(program)
// Random number: 235841973
// Random number: -1698562956
```

10 changes: 5 additions & 5 deletions docs/micrometer.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ import zio.interop.catz.implicits._
import zio.Task

implicit val runtime = new DefaultRuntime {} // this is just needed in example
// runtime: AnyRef with DefaultRuntime = repl.Session$App$$anon$1@1c5cd2ea // this is just needed in example
// runtime: AnyRef with DefaultRuntime = repl.Session$App$$anon$1@cda144a // this is just needed in example

val dsl = Http4sDsl[Task] // this is just needed in example
// dsl: Http4sDsl[Task] = org.http4s.dsl.Http4sDsl$$anon$1@1f7fcec2 // this is just needed in example
// dsl: Http4sDsl[Task] = org.http4s.dsl.Http4sDsl$$anon$1@7a71ebf1 // this is just needed in example
import dsl._

for {
Expand All @@ -48,10 +48,10 @@ for {
// res0: Resource[Task, Server[Task]] = Bind(
// Bind(
// Bind(
// Suspend(zio.ZIO$FlatMap@77e1dacd),
// com.avast.sst.jvm.execution.ExecutorModule$$$Lambda$1652/2118457232@34ede267
// Suspend(zio.ZIO$FlatMap@1c5d376c),
// com.avast.sst.jvm.execution.ExecutorModule$$$Lambda$1652/1064414847@51c6e775
// ),
// cats.effect.Resource$$Lambda$1653/622274963@7a522157
// cats.effect.Resource$$Lambda$1653/1530060977@5feff876
// ),
// <function1>
// )
Expand Down
2 changes: 1 addition & 1 deletion example/src/main/mdoc/http4s.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ val resource = for {
executorModule <- ExecutorModule.makeDefault[Task]
console = ConsoleModule.make[Task]
server <- Http4sBlazeServerModule.make[Task](Http4sBlazeServerConfig("127.0.0.1", 0), routes, executorModule.executionContext)
client <- Http4sBlazeClient.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
client <- Http4sBlazeClientModule.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
} yield (server, client, console)

val program = resource
Expand Down
2 changes: 1 addition & 1 deletion example/src/main/mdoc/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ val resource = for {
executorModule <- ExecutorModule.makeDefault[Task]
console = ConsoleModule.make[Task]
server <- Http4sBlazeServerModule.make[Task](Http4sBlazeServerConfig("127.0.0.1", 0), routes, executorModule.executionContext)
client <- Http4sBlazeClient.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
client <- Http4sBlazeClientModule.make[Task](Http4sBlazeClientConfig(), executorModule.executionContext)
} yield (server, client, console)

val program = resource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import org.http4s.client.blaze.BlazeClientBuilder
import scala.concurrent.ExecutionContext
import scala.language.higherKinds

object Http4sBlazeClient {
object Http4sBlazeClientModule {

/** Makes [[org.http4s.client.Client]] (Blaze) initialized with the given config.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class Http4SBlazeClientTest extends AsyncFunSuite {
|""".stripMargin

val test = for {
client <- Http4sBlazeClient.make[IO](
client <- Http4sBlazeClientModule.make[IO](
Http4sBlazeClientConfig(
userAgent = `User-Agent`(AgentProduct("http4s-client", Some("1.2.3")), List(AgentComment("Test")))
),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package com.avast.sst.http4s.server

import cats.effect.{ContextShift, IO, Timer}
import com.avast.sst.http4s.client.{Http4sBlazeClient, Http4sBlazeClientConfig}
import com.avast.sst.http4s.client.{Http4sBlazeClientConfig, Http4sBlazeClientModule}
import org.http4s.HttpRoutes
import org.http4s.dsl.Http4sDsl
import org.scalatest.AsyncFunSuite
Expand All @@ -19,7 +19,7 @@ class Http4sBlazeServerModuleTest extends AsyncFunSuite with Http4sDsl[IO] {
})
val test = for {
server <- Http4sBlazeServerModule.make[IO](Http4sBlazeServerConfig("127.0.0.1", 0), routes, ExecutionContext.global)
client <- Http4sBlazeClient.make[IO](Http4sBlazeClientConfig(), ExecutionContext.global)
client <- Http4sBlazeClientModule.make[IO](Http4sBlazeClientConfig(), ExecutionContext.global)
} yield (server, client)

test
Expand Down

0 comments on commit 056a6db

Please sign in to comment.