KO
|
EN
gitlite — search
Search
#javascript
#python
#hacktoberfest
#react
#ai
#typescript
#llm
#go
#golang
#android
#machine-learning
#rust
#deep-learning
#linux
go-healthz
★ 8
Open GitHub ↗
An HTTP health check handler for Go
Download README (.md)
Explore Similar Repositories
EleLoadingView
:
A beautiful loading view for android inspired by Ele.me and dribbble
curated_ham
:
A content curation tool written in ruby
shoot-em-up
:
Corona SDK Shoot'em up game template
aarch64_dockerfiles
:
Dockerfiles for aarch64
Android-Change-Page-Control
:
模拟淘宝,京东商品详情上下翻页功能,实现上下翻页的控件,支持多种View,可自行添加
// repository documentation
Was this content helpful?
★ 0
(0 ratings)
Select Rating:
★
★
★
★
★
Submit Feedback
Recent Feedback
×
Download README
Do you want to download the
README.md
file for
go-healthz
?
Download (.md)
# go-healthz [](https://circleci.com/gh/MEDIGO/go-healthz) This package provides an HTTP handler that returns information about the health status of the application. If the application is healthy and all the registered check pass, it returns a `200 OK` HTTP status, otherwise, it fails with a `503 Service Unavailable`. All responses contain a JSON encoded payload with information about the runtime system, current checks statuses and some configurable metadata. ### Usage ```go package main import ( "errors" "net/http" "time" "github.com/MEDIGO/go-healthz" ) const version = "1.0.0" func main() { healthz.Set("version", version) healthz.Register("important_check", time.Second*5, func() error { return errors.New("fail fail fail") }) http.Handle("/healthz", healthz.Handler()) http.ListenAndServe(":8000", nil) } ``` ``` $ http GET localhost:8000/healthz HTTP/1.1 503 Service Unavailable Content-Length: 317 Content-Type: application/json Date: Fri, 23 Sep 2016 08:55:16 GMT { "status": "Unavailable", "time": "2016-09-23T10:55:16.781538256+02:00", "since": "2016-09-23T10:55:14.268149643+02:00", "metadata": { "version": "1.0.0" }, "failures": { "important_check": "fail fail fail" }, "runtime": { "alloc_bytes": 314048, "arch": "amd64", "goroutines_count": 4, "heap_objects_count": 4575, "os": "darwin", "total_alloc_bytes": 314048, "version": "go1.7" } } ``` ## Copyright and license Copyright © 2025 MEDIGO GmbH. go-healthz is licensed under the Apache License, Version 2.0. See [LICENSE](LICENSE) for the full license text.