This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sttp.client._ | |
import sttp.model.StatusCode | |
object FlatSttp { | |
class FullHttpError(status: StatusCode, body: String) | |
extends RuntimeException(s"Status code $status: $body") | |
val asFullError: ResponseAs[FullHttpError, Nothing] = asStringAlways.mapWithMetadata { | |
case (body, meta) => new FullHttpError(meta.code, body) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package example | |
import com.typesafe.scalalogging._ | |
import org.slf4j.MDC | |
object Main extends App with PosLogging { | |
new Foo().doStuff() | |
Logger(getClass).info("Goodbye, MDC") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import monix.execution.Scheduler | |
import monix.reactive.Observable | |
object LeakSample { | |
def main(args: Array[String]) { | |
implicit val scheduler = Scheduler.computation(2) | |
val hotObservable = (1 +: Observable.never).behavior(0) | |
hotObservable.connect() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
akka { | |
actor.provider = "akka.remote.RemoteActorRefProvider" | |
actor.serialize-messages = off | |
remote { | |
transport = "akka.remote.netty.NettyRemoteTransport" | |
netty { | |
hostname = localhost | |
port = 2552 | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.luxoft.sbrf.cluster.actors | |
import akka.actor._ | |
import akka.routing._ | |
import akka.util.duration._ | |
import scala.util.Random | |
import com.google.common.base.Stopwatch | |
import akka.routing.Broadcast | |
import akka.routing.RemoteRouterConfig | |
import com.luxoft.sbrf.cluster.actors.Snl.Calculator.Calculated |