Glossary
Search and filter commands for Cats Effect → ZIO
All 66 commands
Cats Effect
ZIO
ZIO.succeed(a)IO.pure(a)ZIO.fail(e)IO.raiseError(e)ZIO.effect(thunk)IO.delay(thunk)ZIO.attempt(thunk)IO.blocking(thunk)UIO[A]IO[A]ZIO.fromEither(e)IO.fromEither(e)ZIO.fromOption(o)IO.fromOption(o)effect.catchAll(f)effect.handleErrorWith(f)effect.orElse(fallback)effect.handleErrorWith(_ => fallback)effect.mapError(f)effect.adaptError(f)effect.retry(schedule)effect.timeout + handleErrorZIO.collectAll(list)list.sequenceZLayer.succeed(service)Resource.pure(service)effect.provideLayer(layer)Kleisli.run(effect)(service)ZIO.service[A]IO.ask[A]layer1 ++ layer2Resource.forProductNZManaged.acquireReleaseResource.makeeffect.forkeffect.startfiber.joinfiber.joineffect1.race(effect2)effect1.race(effect2)effect.timeout(duration)effect.timeout(duration)fiber.interruptfiber.cancelZIO.supervisedResource with cancelZIO.collectAllPar(list)list.parSequenceZStream(values)Stream(values)stream.map(f)stream.map(f)stream.filter(p)stream.filter(p)stream.runCollectstream.compile.toListstream.mapZIO(f)stream.evalMap(f)stream.merge(other)stream.merge(other)ZStream.fromPath(path)Files[IO].readAll(path)TRef.make(a)TRef.of[F](a)STM.succeed(a)STM.pure(a)STM.retrySTM.retrytransaction.committransaction.commit[F]TMap.empty[K, V]TMap.empty[F, K, V]TQueue.unbounded[A]TQueue.unbounded[F, A]ZIO.config[A]ConfigValue[F, A].load[F]Config.stringenv(key).as[String]Config.intenv(key).as[Int]ConfigProvider.envProviderenv(key) defaultderiveConfig[A]parMapN(A)cfg.withDefault(value)ConfigValue.default(value)cfg.validate(msg)(p)Custom ConfigDecoderHttp.collect[Request] { case ... }HttpRoutes.of[IO] { case ... }Response.text(body)Ok(body)Client.request(url)client.expect[String](uri)Server.serve(app)BlazeServerBuilder[IO].serveMethod.GET -> Root / "path"GET -> Root / "path"req.body.asJson[A]req.as[A]Response(status, body = Body.fromStream)Ok(stream)query(sql).as[A]sql"...".query[A]execute(sql).param(v)sql"...$v"query(...).transactionsql"...".transact(xa)ZConnectionPool.h2(url, user, pass)Transactor.fromDataSourceexecute(sql).returning.update.withUniqueGeneratedKeyssql ++ whereFragment ++ Fragmentobject Main extends ZIOAppDefaultobject Main extends IOApp.Simpleoverride val run: ZIO[...]val run: IO[Throwable, Unit]override val bootstrapIORuntime (implicit)effect.onInterrupt(f)effect.onCancel(f)ZIO.logInfo(msg)logger.info(msg) (log4cats)zio.toIOUse in CE via interopzio.toResourceUse in CE via interopeffects.parTupledeffects.parTupledlist.traverse(ZIO)list.traverse(IO)