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 HandlerOps extends AnyVal

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

Instance Constructors

  1. new HandlerOps(handler: Handler[Any])

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. val handler: Handler[Any]
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. def toString(): String
    Definition Classes
    Any
  9. def withAccessLog[A, M](f: () ⇒ A)(accessLog: AccessLog[A, M]): Handler[M]

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

    Wraps the request-response handler in a new one 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 handler

  10. def withAccessLog[M](accessLog: AccessLog[Long, M]): Handler[M]

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

    Wraps the request-response handler in a new one which also streams sink for 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 handler

Inherited from AnyVal

Inherited from Any

Ungrouped