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
| [Unit] | |
| Description=vault server | |
| Requires=network-online.target | |
| After=network-online.target consul.service | |
| [Service] | |
| EnvironmentFile=-/etc/sysconfig/vault | |
| Restart=on-failure | |
| ExecStart=/usr/local/sbin/vault server $OPTIONS -config=/etc/vault.d | |
| ExecStartPost=/bin/bash -c "for key in $KEYS; do /usr/local/sbin/vault unseal $CERT $key; done" |
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
| scala> class Foo { self: Singleton => } | |
| defined class Foo | |
| scala> class Bar extends Foo | |
| <console>:12: error: illegal inheritance; | |
| self-type Bar does not conform to Foo's selftype Foo with Singleton | |
| class Bar extends Foo | |
| ^ | |
| scala> object Bar extends Foo |
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 akka.actor.ActorSystem | |
| import akka.event.{Logging, LoggingAdapter} | |
| import akka.http.scaladsl.Http | |
| import akka.http.scaladsl.client.RequestBuilding | |
| import akka.http.scaladsl.marshallers.sprayjson.SprayJsonSupport._ | |
| import akka.http.scaladsl.marshalling._ | |
| import akka.http.scaladsl.model._ | |
| import akka.http.scaladsl.model.StatusCodes._ | |
| import akka.http.scaladsl.server.Directives | |
| import akka.http.scaladsl.server.Directives._ |
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 com.example | |
| import akka.actor.ActorSystem | |
| import akka.http.Http | |
| import akka.http.marshalling.ToResponseMarshallable.apply | |
| import akka.http.server.Directive.addByNameNullaryApply | |
| import akka.http.server.Directive.addDirectiveApply | |
| import akka.http.server.Directives.IntNumber | |
| import akka.http.server.Directives.complete | |
| import akka.http.server.Directives.get |
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 akka.http.scaladsl | |
| import java.io.File | |
| import akka.http.scaladsl.unmarshalling.Unmarshal | |
| import akka.util.ByteString | |
| import scala.concurrent.duration._ | |
| import akka.actor.ActorSystem |
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 utils | |
| import scala.concurrent.duration.FiniteDuration | |
| import scala.concurrent.duration._ | |
| import play.api.Application | |
| import collection.JavaConversions._ | |
| object ConfigString { | |
| implicit class ConfigStr(s: String) { | |
| def configOrElse(default: FiniteDuration)(implicit app: Application): FiniteDuration = |