{"id":13507361,"url":"https://github.com/xerions/medex","last_synced_at":"2025-10-21T16:17:16.506Z","repository":{"id":57522416,"uuid":"45040681","full_name":"xerions/medex","owner":"xerions","description":" Medical Examination - application for register health check callbacks and represent their state via HTTP.","archived":false,"fork":false,"pushed_at":"2015-12-11T08:22:33.000Z","size":7,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2024-10-04T16:17:19.720Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Elixir","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xerions.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-10-27T12:49:20.000Z","updated_at":"2020-12-28T11:45:33.000Z","dependencies_parsed_at":"2022-08-29T20:40:40.594Z","dependency_job_id":null,"html_url":"https://github.com/xerions/medex","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmedex","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmedex/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmedex/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xerions%2Fmedex/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xerions","download_url":"https://codeload.github.com/xerions/medex/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":222535179,"owners_count":16999233,"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":[],"created_at":"2024-08-01T02:00:32.147Z","updated_at":"2025-10-21T16:17:11.463Z","avatar_url":"https://github.com/xerions.png","language":"Elixir","funding_links":[],"categories":["Applications"],"sub_categories":[],"readme":"# Medex [![Build Status](https://travis-ci.org/xerions/medex.svg)](https://travis-ci.org/xerions/medex)\n\nMedical Examination - application for register health check callbacks and represent their state via HTTP.\n\n## Installation\n\n1. Add medex to your list of dependencies in `mix.exs`:\n\n    ```elixir\n    def deps do\n      [{:medex, github: \"xerions/medex\"}]\n    end\n    ```\n\n2. Ensure medex is started before your application:\n\n    ```elixir\n    def application do\n      [applications: [:medex]]\n    end\n    ```\n\n\n## Example\n\nRegister new check callback:\n\n```elixir\nMedex.register \"db\", fn -\u003e\n    case :erlang.phash2(:erlang.now, 3) do\n      0 -\u003e :ok\n      1 -\u003e :warning\n      2 -\u003e :critical\n    end\n  end\n```\n\nand get state\n\n    $ curl -v http://localhost:4000/health/db\n\n## Consul\n\nMedex suports pushing health check statutes to [Consul](https://www.consul.io/). It is disabled by default but you can turn it on:\n\n```elixir\n# use consul, false by default\nconfig :medex, consul: true\n\n# which service name will be using for consul health-checks (optional)\nconfig :medex, service_id: \"service_example\"\n```\n\nAnd ensure start of consul application.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxerions%2Fmedex","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxerions%2Fmedex","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxerions%2Fmedex/lists"}