ZSaga

zio.temporal.workflow.ZSaga
See theZSaga companion object
sealed trait ZSaga[+A]

Implements the logic to execute compensation operations that is often required in Saga applications. The following is a skeleton to show of how it is supposed to be used in workflow code:

Type parameters

A

value type

Attributes

See also
Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ZSaga[A]

Members list

Value members

Concrete methods

def as[B](value: B): ZSaga[B]
def catchAll[A0 >: A](f: Throwable => ZSaga[A0]): ZSaga[A0]
def catchSome[A0 >: A](pf: PartialFunction[Throwable, ZSaga[A0]]): ZSaga[A0]
def flatMap[B](f: A => ZSaga[B]): ZSaga[B]
def map[B](f: A => B): ZSaga[B]
final def run(options: Options): Either[Throwable, A]

Runs this saga, returning either error or successful value. Compensations are automatically applied if error occurs

Runs this saga, returning either error or successful value. Compensations are automatically applied if error occurs

Value parameters

options

ZSaga options

Attributes

Returns

either successful value or error (with compensations executed)

final def runOrThrow(options: Options): A
def unit: ZSaga[Unit]
final def zipWith[B, C](that: => ZSaga[B])(f: (A, B) => C): ZSaga[C]