This file contains hidden or 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
| SHELL:=/bin/bash | |
| vpn_address ?= $(shell ip route get 1 | awk '{print $$NF;exit}') | |
| username ?= "vpn-user-$(shell hostname)" | |
| default: | |
| make install-docker | |
| make init-config | |
| make run-server | |
| make new-client |
This file contains hidden or 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
| monitoring: | |
| alerts: | |
| RPS: | |
| prometheus: sum(rate(ws_requests_latency_seconds_count{app="services/front-office-service"}[5m])) | |
| warn if more: 200 | |
| crit if more: 500 | |
| Requests latency: | |
| prometheus: histogram_quantile(0.95, sum(rate(ws_requests_latency_seconds_bucket[1m]{app="services/front-office-service"})) by (le, app)) | |
| warn if more: 100 |
This file contains hidden or 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
| version: '2' | |
| services: | |
| gocd-server: | |
| image: unibet/gocd-server | |
| ports: | |
| - 8153:8153 | |
| - 8154:8154 | |
| volumes: | |
| - ./go-data/etc:/etc/go | |
| - ./go-data/lib:/var/lib/go-server |
This file contains hidden or 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 scala.language.higherKinds | |
| import akka.actor.ActorSystem | |
| import scala.collection.generic.CanBuildFrom | |
| import scala.collection.mutable | |
| import scala.concurrent.duration._ | |
| import scala.concurrent.{ExecutionContext, Future, Promise, TimeoutException} | |
| import scala.util.{Failure, Success} | |
| import eu.inn.util.ConfigComponent |
This file contains hidden or 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
| object FutureHelpers { | |
| def collectWhile[A, B](in: Seq[Future[A]])(pf: PartialFunction[A, B])(implicit ec: ExecutionContext): Future[Seq[B]] = | |
| collectWhileImpl(in, pf, Seq.newBuilder[B]).map(_.result()) | |
| private def collectWhileImpl[A, B](in: Seq[Future[A]], pf: PartialFunction[A, B], buffer: mutable.Builder[B, Seq[B]])(implicit ec: ExecutionContext): Future[mutable.Builder[B, Seq[B]]] = | |
| if (in.isEmpty) { | |
| Future.successful(buffer) | |
| } else { | |
| in.head flatMap { |
This file contains hidden or 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
| echo '{ | |
| "query": { | |
| "bool": { | |
| "must": [ | |
| { "terms": { "person": ["bob", "jake"] } }, | |
| { "range": { "score": { "gt": 0 } } } | |
| ] | |
| } | |
| }, | |
| "aggs": { |
This file contains hidden or 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 eu.inn.forgame.api.rest | |
| import spray.routing.Route | |
| import eu.inn.util.akka.ActorSystemComponent | |
| import eu.inn.util.http.RestServiceComponent | |
| import eu.inn.util.servicebus.ServiceBusComponent | |
| import eu.inn.datamodel.forgame.auth.IssueToken | |
| import eu.inn.forgame.api.directives.{AuthProviderComponent, AuthUser} |
This file contains hidden or 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
| object FlagsRegistry { | |
| private val flagsRegistry = new FlagsRegistry(config, dao, executorService) | |
| def check(serviceId: Long, flag: FlagEnum) = flagsRegistry.check(serviceId, flag) | |
| } | |
| class FlagsRegistry(conf, dao, executorService) { |
This file contains hidden or 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
| server { | |
| listen 80; | |
| server_name localhost; | |
| location / { | |
| proxy_buffering off; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Scheme $scheme; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| proxy_set_header X-Forwarded-Host $host; |
This file contains hidden or 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 eu.inn.util.akka | |
| import concurrent.Future | |
| import concurrent.duration._ | |
| import scala.reflect.ClassTag | |
| import util.control.NonFatal | |
| import akka.actor._ | |
| import akka.util.Timeout |
NewerOlder