TestChannel

zio.http.TestChannel
See theTestChannel companion object
case class TestChannel(in: Queue[WebSocketChannelEvent], out: Queue[WebSocketChannelEvent], promise: Promise[Nothing, Unit]) extends WebSocketChannel

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def awaitShutdown(implicit trace: Trace): UIO[Unit]

Await shutdown of the channel.

Await shutdown of the channel.

Attributes

def receive(implicit trace: Trace): Task[WebSocketChannelEvent]

Read a message from the channel, suspending until the next message is available.

Read a message from the channel, suspending until the next message is available.

Attributes

def receiveAll[Env, Err](f: WebSocketChannelEvent => ZIO[Env, Err, Any])(implicit trace: Trace): ZIO[Env, Err, Unit]

Reads all messages from the channel, handling them with the specified function.

Reads all messages from the channel, handling them with the specified function.

Attributes

def send(in: WebSocketChannelEvent)(implicit trace: Trace): Task[Unit]

Send a message to the channel.

Send a message to the channel.

Attributes

def sendAll(in: Iterable[WebSocketChannelEvent])(implicit trace: Trace): Task[Unit]

Send all messages to the channel.

Send all messages to the channel.

Attributes

def shutdown(implicit trace: Trace): UIO[Unit]

Shut down the channel.

Shut down the channel.

Attributes

Inherited methods

final def contramap[In2](f: In2 => WebSocketChannelEvent): Channel[In2, Out]

Constructs a new channel that automatically transforms messages sent to this channel using the specified function.

Constructs a new channel that automatically transforms messages sent to this channel using the specified function.

Attributes

Inherited from:
Channel
final def map[Out2](f: WebSocketChannelEvent => Out2)(implicit trace: Trace): Channel[In, Out2]

Constructs a new channel that automatically transforms messages received from this channel using the specified function.

Constructs a new channel that automatically transforms messages received from this channel using the specified function.

Attributes

Inherited from:
Channel
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product