Packages

o

ai.mantik.componently.rpc

StreamConversions

object StreamConversions

Helper for converting gRpc Stream Fundamentals into Akka Counterparts.

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

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def callMultiInSingleOutWithHeader[I, O](f: (StreamObserver[O]) => StreamObserver[I], header: I): Sink[I, Future[O]]

    Calls an gRpc resource with multiple input and a single output with special header handling

    Calls an gRpc resource with multiple input and a single output with special header handling

    f

    gRpc Function

    header

    the header to sent

  6. def callMultiOut[Input, Output, R](errorHandler: PartialFunction[Throwable, Throwable], f: (Input, StreamObserver[Output]) => Unit, argument: Input)(handler: Sink[Output, R])(implicit materializer: Materializer): R

    Call a multi out request.

  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  8. def empty[T]: StreamObserver[T]
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  17. def pumpSourceIntoStreamObserver[T](in: Source[T, _], destination: StreamObserver[T])(implicit materializer: Materializer): Unit

    Represents an akka source as Stream Observer.

  18. def respondMultiInSingleOutWithHeader[Input, Output](errorHandler: PartialFunction[Throwable, Throwable], responseObserver: StreamObserver[Output])(f: (Input, Source[Input, _]) => Future[Output])(implicit materializer: Materializer, ec: ExecutionContext): StreamObserver[Input]

    Helper to implement streamy input functions with special treating for the first (header) element.

    Helper to implement streamy input functions with special treating for the first (header) element.

    The function f is called with the first element and the source of ALL elements (including the first)

    f is allowed to block, but not too long.

    errorHandler

    an error handling function.

    f

    handler function

    returns

    a A Stream Observer which handles the input type.

  19. def respondMultiOut[Output](errorHandler: PartialFunction[Throwable, Throwable], responseObserver: StreamObserver[Output], source: Source[Output, _])(implicit materializer: Materializer): Unit

    Respond to a multi out request.

  20. def singleStreamObserverFuture[T](): (StreamObserver[T], Future[T])

    Generates a StreamObserver, which takes a single element and puts it into a future.

  21. def sinkFromStreamObserver[T](destination: StreamObserver[T]): Sink[T, NotUsed]

    Generates a Sink which forwards all to the given stream observer.

  22. def sinkFromStreamObserverWithSpecialHandling[U, T, S](destination: StreamObserver[T], f: (U) => T, g: (U) => T, completer: (Unit) => Option[T] = _: Unit => None, initialState: S, stateUpdate: (S, T) => S): Sink[U, Future[S]]

    Generates a Sink from a stream observer with special handling for the first element.

    Generates a Sink from a stream observer with special handling for the first element.

    U

    sink type

    T

    observer type

    S

    state type (from observer type)

    f

    function used for the first element.

    g

    function used for the rest of the elements.

    completer

    function used when the stream is complete

  23. def splitFirst[T](f: (Try[T]) => StreamObserver[T]): StreamObserver[T]

    Build a stream observer, which splits the first element and calls f, which in turn creates an StreamObserver which is used for the rest of the objects

  24. def streamObserverCollector[T](): (StreamObserver[T], Future[Vector[T]])

    Generates a stream observer which collects many elements into a vector.

    Generates a stream observer which collects many elements into a vector. Do not use in production.

  25. def streamObserverSource[T](bufSize: Int = 1): Source[T, StreamObserver[T]]

    Generates a source which materializes to a Stream Observer.

  26. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  27. def toString(): String
    Definition Classes
    AnyRef → Any
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped