{"id":16680828,"url":"https://github.com/fthomas/status-page","last_synced_at":"2025-04-09T22:40:41.922Z","repository":{"id":37957666,"uuid":"144150210","full_name":"fthomas/status-page","owner":"fthomas","description":"A microlibrary for creating simple status pages","archived":false,"fork":false,"pushed_at":"2025-03-17T17:45:24.000Z","size":843,"stargazers_count":5,"open_issues_count":0,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-01T23:53:21.779Z","etag":null,"topics":["cats","functional-programming","microlibrary","scala","status-page"],"latest_commit_sha":null,"homepage":"","language":"Scala","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fthomas.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-09T12:33:56.000Z","updated_at":"2025-03-17T17:45:28.000Z","dependencies_parsed_at":"2023-02-16T21:31:37.397Z","dependency_job_id":"2dbc4000-f090-4d92-a95b-6ab2236a5fbf","html_url":"https://github.com/fthomas/status-page","commit_stats":null,"previous_names":[],"tags_count":21,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthomas%2Fstatus-page","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthomas%2Fstatus-page/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthomas%2Fstatus-page/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fthomas%2Fstatus-page/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fthomas","download_url":"https://codeload.github.com/fthomas/status-page/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248124842,"owners_count":21051757,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cats","functional-programming","microlibrary","scala","status-page"],"created_at":"2024-10-12T13:44:04.631Z","updated_at":"2025-04-09T22:40:41.903Z","avatar_url":"https://github.com/fthomas.png","language":"Scala","readme":"# status-page\n[![Continuous Integration](https://github.com/fthomas/status-page/actions/workflows/ci.yml/badge.svg)](https://github.com/fthomas/status-page/actions/workflows/ci.yml)\n[![codecov](https://codecov.io/gh/fthomas/status-page/branch/master/graph/badge.svg)](https://codecov.io/gh/fthomas/status-page)\n[![Scaladex](https://index.scala-lang.org/fthomas/status-page/latest.svg?color=blue)](https://index.scala-lang.org/fthomas/status-page/status-page-core)\n[![Scaladoc](https://www.javadoc.io/badge/eu.timepit/status-page-core_2.12.svg?color=blue\u0026label=Scaladoc)](https://javadoc.io/doc/eu.timepit/status-page-core_2.12)\n\n**status-page** is a microlibrary for creating simple status pages.\nIt provides data structures and functions to organize, aggregate, and render\nstatus information in a straightforward way.\n\n## Quick example\n\n```scala\nimport cats.effect.IO\nimport eu.timepit.statuspage.cats.Make\nimport eu.timepit.statuspage.core.Result.{Ok, Warning}\nimport eu.timepit.statuspage.core.plaintext\n\n// We use `IO` values for status checks, but the library supports any\n// type that is an `ApplicativeError`.\nval uptime: IO[String] = IO(\"up 2 weeks, 3 days, 13 hours, 27 minutes\")\nval dbQuery: IO[Unit] = IO(())\nval dbItems: IO[Int] = IO(38)\nval sparkNode1: IO[Unit] = IO(())\nval sparkNode2: IO[Unit] = IO.raiseError(new Exception(\"unreachable\"))\n```\n```scala\nval mk = new Make[IO, Throwable](_.getMessage)\n// mk: eu.timepit.statuspage.cats.Make[cats.effect.IO,Throwable] = eu.timepit.statuspage.cats.Make@12af9bd3\n\nval root = mk.root(\n  mk.entryInfo(\"uptime\", uptime),\n  mk.group(\n    \"database\",\n    mk.entryOk(\"query\", dbQuery),\n    mk.entry(\"items\", dbItems)(i =\u003e if (i \u003e 50) Ok else Warning.withMsg(i.toString))\n  ),\n  mk.group(\n    \"spark_cluster\",\n    mk.entryOk(\"node1\", sparkNode1),\n    mk.entryOk(\"node2\", sparkNode2)\n  )\n)\n// root: cats.effect.IO[eu.timepit.statuspage.core.Root] = \u003cfunction1\u003e\n\nroot.map(plaintext.renderRoot).unsafeRunSync()\n// res0: String =\n// status: ERROR\n// uptime: up 2 weeks, 3 days, 13 hours, 27 minutes\n// database_status: WARNING\n// database_query: OK\n// database_items: WARNING 38\n// spark_cluster_status: ERROR\n// spark_cluster_node1: OK\n// spark_cluster_node2: ERROR unreachable\n```\n\n## Using status-page\n\nThe latest version of the library is available for Scala 2.12, 2.13, and 3.\n\nIf you're using sbt, add the following to your build:\n```sbt\nlibraryDependencies ++= Seq(\n  \"eu.timepit\" %% \"status-page-core\" % \"\u003clatestVersion\u003e\",\n  \"eu.timepit\" %% \"status-page-cats\" % \"\u003clatestVersion\u003e\"\n)\n```\n\n## License\n\n**status-page** is licensed under the Apache License, Version 2.0, available at\nhttp://www.apache.org/licenses/LICENSE-2.0 and also in the\n[LICENSE](https://github.com/fthomas/status-page/blob/master/LICENSE) file.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffthomas%2Fstatus-page","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffthomas%2Fstatus-page","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffthomas%2Fstatus-page/lists"}