case class WebServer(pollingInterval: Int = 60, statsDays: Int = 730, routeGenerator: (StateService) ⇒ PartialFunction[Request, Future[Response]] = _ => PartialFunction.empty, executors: List[Executor[_]] = List.empty)(implicit ec: ExecutionContext) extends Product with Serializable
Slab Web server
- pollingInterval
The polling interval in seconds
- statsDays
Specifies how many last days of statistics to be retained
- routeGenerator
A function that generates custom routes (should starts with "/api")
- executors
The executors of the boards
- ec
The execution context for the web server
Linear Supertypes
Ordering
- Alphabetic
- By Inheritance
Inherited
- WebServer
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Instance Constructors
-
new
WebServer(pollingInterval: Int = 60, statsDays: Int = 730, routeGenerator: (StateService) ⇒ PartialFunction[Request, Future[Response]] = _ => PartialFunction.empty, executors: List[Executor[_]] = List.empty)(implicit ec: ExecutionContext)
- pollingInterval
The polling interval in seconds
- statsDays
Specifies how many last days of statistics to be retained
- routeGenerator
A function that generates custom routes (should starts with "/api")
- executors
The executors of the boards
- ec
The execution context for the web server
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply(port: Int): Unit
Start the web server
Start the web server
- port
The server's port
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
attach[L <: HList, O](board: Board[L])(implicit runBoard: Aux[RunBoard.type, Board[L], Context, Boolean, Future[BoardView]], fetchBoardHistory: Aux[FetchBoardHistory.type, Board[L], Instant, Instant, Future[Seq[(Long, BoardView)]]], fetchBoardHourlySlo: Aux[FetchBoardHourlySlo.type, Board[L], Instant, Instant, Future[Seq[(Long, Double)]]], store: Store[O]): WebServer
Attach a board to the server
Attach a board to the server
- board
The board
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- val pollingInterval: Int
- val statsDays: Int
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
withRoutes(generator: (StateService) ⇒ PartialFunction[Request, Future[Response]]): WebServer
- generator
A function that takes StateService and returns routes
- returns
Web server with the created routes