object StreamConversions
Helper for converting gRpc Stream Fundamentals into Akka Counterparts.
- Alphabetic
- By Inheritance
- StreamConversions
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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
- 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.
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def empty[T]: StreamObserver[T]
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def pumpSourceIntoStreamObserver[T](in: Source[T, _], destination: StreamObserver[T])(implicit materializer: Materializer): Unit
Represents an akka source as Stream Observer.
- 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.
- def respondMultiOut[Output](errorHandler: PartialFunction[Throwable, Throwable], responseObserver: StreamObserver[Output], source: Source[Output, _])(implicit materializer: Materializer): Unit
Respond to a multi out request.
- def singleStreamObserverFuture[T](): (StreamObserver[T], Future[T])
Generates a StreamObserver, which takes a single element and puts it into a future.
- def sinkFromStreamObserver[T](destination: StreamObserver[T]): Sink[T, NotUsed]
Generates a Sink which forwards all to the given stream observer.
- 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
- 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
- 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.
- def streamObserverSource[T](bufSize: Int = 1): Source[T, StreamObserver[T]]
Generates a source which materializes to a Stream Observer.
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])