Packages

  • package root
    Definition Classes
    root
  • package de
    Definition Classes
    root
  • package heikoseeberger
    Definition Classes
    de
  • package accessus
    Definition Classes
    heikoseeberger
  • object Accessus

    Provides ways to wrap a route or request-response handler in a new handler which also streams pairs of enriched request and response to an access log sink:

    Provides ways to wrap a route or request-response handler in a new handler which also streams pairs of enriched request and response to an access log sink:

    +------------------------------------------------------------------------------------+
    |                                                                                    |
    |        +-----------+      +-----------+      +-----------+      +-----------+      |
    |   +--->○ enrichReq ○----->○   unzip   ○----->○  handler  ○----->○  bcastRes ○--+   |
    |   |    +-----------+      +-----○-----+      +-----------+      +-----------+  |   |
    |   |                             |                                     |        |   |
    ○---+                             |                                     |        +-->○
    |                                 v                                     |            |
    |        +-----------+      +-----○-----+                               |            |
    |        | accessLog ○<-----○    zip    ○<------------------------------+            |
    |        +-----------+      +-----------+                                            |
    |                                                                                    |
    +------------------------------------------------------------------------------------+

    Example:

    import Accessus._
    Http().bindAndHandle(
     route.withAccessLog(Sink.foreach { case ((req, t), res) => ??? }),
     "0.0.0.0",
     8000
    )
    Definition Classes
    accessus
  • HandlerOps
  • RouteOps

implicit final class RouteOps extends AnyVal

Linear Supertypes
AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RouteOps
  2. AnyVal
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RouteOps(route: Route)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  6. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  7. val route: Route
  8. def toString(): String
    Definition Classes
    Any
  9. def withAccessLog[A, M](f: () ⇒ A)(accessLog: AccessLog[A, M])(implicit sytem: ActorSystem, mat: ActorMaterializer): Handler[M]

    Wraps the route in a new request-response handler which also streams sink for pairs of enriched request and response to the given access log sink.

    Wraps the route in a new request-response handler which also streams sink for pairs of enriched request and response to the given access log sink.

    f

    enrich the request, e.g. with a timestamp

    accessLog

    sink for pairs of enriched request and response

    returns

    handler to be used in Http().bindAndHandle wrapping the given route

  10. def withAccessLog[M](accessLog: AccessLog[Long, M])(implicit sytem: ActorSystem, mat: ActorMaterializer): Handler[M]

    Wraps the route in a new request-response handler which also streams pairs of request enriched with a timestamp and response to the given access log sink.

    Wraps the route in a new request-response handler which also streams pairs of request enriched with a timestamp and response to the given access log sink.

    accessLog

    sink for pairs of enriched request and response

    returns

    handler to be used in Http().bindAndHandle wrapping the given route

Inherited from AnyVal

Inherited from Any

Ungrouped