function
¤
DurableFunction
¤
DurableFunction(fn: FunctionType)
A wrapper for generator functions and async functions that make their generator and coroutine instances serializable.
Serializable
¤
Serializable(
g: Union[GeneratorType, CoroutineType],
registered_fn: RegisteredFunction,
wrapped_coroutine: Union[DurableCoroutine, None],
*args: Any,
**kwargs: Any
)
A wrapper for a generator or coroutine that makes it serializable.
DurableCoroutine
¤
DurableCoroutine(
coroutine: CoroutineType,
registered_fn: RegisteredFunction,
*args: Any,
**kwargs: Any
)
Bases: Serializable
, Coroutine[_YieldT, _SendT, _ReturnT]
A wrapper for a coroutine that makes it serializable (can be pickled). Instances behave like the coroutines they wrap.
DurableGenerator
¤
DurableGenerator(
generator: GeneratorType,
registered_fn: RegisteredFunction,
coroutine: Optional[DurableCoroutine],
*args: Any,
**kwargs: Any
)
Bases: Serializable
, Generator[_YieldT, _SendT, _ReturnT]
A wrapper for a generator that makes it serializable (can be pickled). Instances behave like the generators they wrap.
durable
¤
durable(fn: Callable) -> Callable
Returns a "durable" function that creates serializable generators or coroutines.