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

Concise view

Value members

Abstract methods

Await shutdown of the channel.

Await shutdown of the channel.

Attributes

def receive: 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 send(in: In): Task[Unit]

Send a message to the channel.

Send a message to the channel.

Attributes

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): 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

final def receiveAll[Env](f: Out => ZIO[Env, Throwable, Any]): ZIO[Env, Throwable, Nothing]

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