WebSocketHooks

caliban.interop.tapir.WebSocketHooks
See theWebSocketHooks companion trait

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def ack[R, E](f: ZIO[R, E, ResponseValue]): WebSocketHooks[R, E]
def afterInit[R, E](f: ZIO[R, E, Any]): WebSocketHooks[R, E]

Specifies a callback that will be run after an incoming subscription request has been accepted. Useful for e.g terminating a subscription after some time, such as authorization expiring.

Specifies a callback that will be run after an incoming subscription request has been accepted. Useful for e.g terminating a subscription after some time, such as authorization expiring.

Attributes

def empty[R, E]: WebSocketHooks[R, E]
def init[R, E](f: InputValue => ZIO[R, E, Any]): WebSocketHooks[R, E]

Specifies a callback that will be run before an incoming subscription request is accepted. Useful for e.g authorizing the incoming subscription before accepting it.

Specifies a callback that will be run before an incoming subscription request is accepted. Useful for e.g authorizing the incoming subscription before accepting it.

Attributes

def message[R, E](f: StreamTransformer[R, E]): WebSocketHooks[R, E]

Specifies a callback that will be run on the resulting ZStream for every active subscription. Useful to e.g modify the environment to inject session information into the ZStream handling the subscription.

Specifies a callback that will be run on the resulting ZStream for every active subscription. Useful to e.g modify the environment to inject session information into the ZStream handling the subscription.

Attributes

def pong[R, E](f: InputValue => ZIO[R, E, Any]): WebSocketHooks[R, E]

Specifies a callback that will be run when ever a pong message is received.

Specifies a callback that will be run when ever a pong message is received.

Attributes