innovaco / service-control   0.2.17

BSD 3-clause "New" or "Revised" License GitHub

bootstrap helper library for Scala services

Scala versions: 2.11

service-control

Build Status

Latest Releases

service-control is a bootstrap helper library for Scala services. It provides a basic DI, entry point and console control.

A plain example how-to use a library:

class MyService(console: Console) extends api.Service {
  console.writeln("Service is started")

  def stopService(controlBreak: Boolean): Unit = {
    console.writeln("Service is stopped")
  }
}

object TestMain extends ConsoleModule {
  bind [Service] to injected [MyService]

  def main(args: Array[String]): Unit = {
    inject[ServiceController].run()
  }
}

License

Product licensed under BSD 3-clause as stated in file LICENSE