Channel

zio.http.Channel
trait Channel[-In, +Out]

A Channel is an asynchronous communication channel that supports receiving messages of type In and sending messages of type Out.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Channel[In, Out]

Members list

Value members

Abstract 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[Out]

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: Out => 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: In)(implicit trace: Trace): Task[Unit]

Send a message to the channel.

Send a message to the channel.

Attributes

def sendAll(in: Iterable[In])(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

Concrete methods

final def contramap[In2](f: In2 => In): 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

final def map[Out2](f: Out => 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