Object/Class

quasar.api

QHttpService

Related Docs: class QHttpService | package api

Permalink

object QHttpService

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. QHttpService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. val PROCESS_EFFECT_THRESHOLD_BYTES: Long

    Permalink

    Producing this many bytes from a Process[F, ByteVector] should require at least one F effect.

    Producing this many bytes from a Process[F, ByteVector] should require at least one F effect.

    The scenarios this is intended to handle involve prepending a small wrapper around a stream, like "[\n" when outputting JSON data in an array, and thus 100 bytes seemed large enough to contain these cases and small enough as to not force more than is needed.

    This exists because of how http4s handles errors from Process responses. If an error is produced by a Process while streaming the connection is severed, but the headers and status code have already been emitted to the wire so it isn't possible to emit a useful error message or status. In an attempt to handle many common scenarios where the first effect in the stream is the most likely to error (i.e. opening a file, or other resource to stream from) we'd like to step the stream until we've reached the first F effect so that we can see if it succeeds before continuing with the rest of the stream, providing a chance to respond with an error in the failure case.

    We cannot just Process.unemit the Process as there may be non-F Await steps encountered before an actual F effect (from many of the combinators in process1 and the like).

    This leads us to the current workaround which is to define this threshold which should be, ideally, just large enough to require the first F to produce the bytes, but not more. We then consume the byte stream until it ends or we've consumed this many bytes. Finally we have a chance to inspect the F and see if anything failed before handing the rest of the process to http4s to continue streaming to the client as normal.

  5. def apply[S[_]](f: slamdata.Predef.PartialFunction[Request, Free[S, QResponse[S]]])(implicit C: Catchable[[β$4$]Free[S, β$4$]]): QHttpService[S]

    Permalink
  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  16. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  18. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  20. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped