Giter Site home page Giter Site logo

mjpitz / go-gracefully Goto Github PK

View Code? Open in Web Editor NEW
10.0 2.0 1.0 154 KB

A simple, efficient, and easy to use Golang library for implementing application health checks. Features first-class support for stream-based checks.

License: MIT License

Makefile 1.53% Go 98.47%
golang healthcheck health-check go status statuspage

go-gracefully's Introduction

👋 Welcome! My name is Mya.

Name Pronunciation Pronouns: she / her

LinkedIn

I'm an Engineering Director who enjoys building and working with teams around the world. Outside of work, I'm an avid hockey player and enjoy spending time in my garden. I'm passionate about doing more to save our environment ♻️. While much of my learning has been confined to my own space, I look forward to sharing my knowledge with others.


📖 Favorite Books 📖

Hold Me Tight - Dr. Sue Johnson EdD - [Amazon] [Kindle] [Audible]
Superbosses - Sydney Finkelstein - [Amazon] [Kindle] [Audible]
Dare to Lead - Brené Brown - [Amazon] [Kindle] [Audible]
Team Topologies - Matthew Skelton and Manuel Pais - [Amazon] [Kindle] [Audible]

📰 Recent Blog Posts 📰

Bye-Bye Twitter - January 17th 2022
Extending my Security System with a Raspberry Pi Network Bridge - June 16th 2021



⚒️ Tools and Technologies ⚒️

Git  Go  Grafana  Kubernetes  NodeJS  Podman  Raspberry Pi  Redis  Terraform  TypeScript  k3s  ArgoCD  Prometheus



Helm Charts Container Images Blog Papers Media



All projects adopt the Contributor Covenant Code of Conduct.

go-gracefully's People

Contributors

alonsopf avatar mjpitz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

alonsopf

go-gracefully's Issues

Examples

Let's add some examples to show people how to get started. The two that come to mind immediately are:

  • how to hook into gRPC
  • how to hook into HTTP mux

I really liked the way grpc-go set this up and would like to follow the example they set. The directory structure is:

examples/
  |- features/
    |- periodic-check
    |- stream-check
    |- comparative-check
    |- error-rate-check
  |- integrations/
    |- grpc
    |- http

Each directory contains a main.go file demonstrating the given feature / integration and a README.md that describes how to run it (mostly using go run.

Add error-rate check

The idea would be to add a new type of check that allows errors to be pushed into a channel. The associated check keeps track of the error rates and compares it with the desired thresholds. When it reaches / passes a given threshold, it changes the checks state.

Deprecate in favor of indeedeng/libhealth

I wrote this as a placeholder while I was waiting for the aforementioned project to be open sourced. It would be nice if the JSON data returned wasn't so verbose, but that's an easy PR.

Reduce go routine usage

The current version was written in a way to get a solution out the door pretty quickly. It would be good to revisit and reduce the number of goroutines that are needed here.

Reduce goroutine requirements

For simplicity in early development, I gave each check their own goroutine to feed the shared channel. Since goroutines are much lighter weight than Java threads, I didn't (and honestly still don't) think too much about this.

Curious if this is something folks will actually need for their system. If so, it would be good to get some input from folks.

Raise test coverage

Now that I've gotten codecov for the project, I want to raise the minimum test coverage.

Some errors not reporting correctly..

This was kinda odd to see today. When one of my gRPC services returned an error, the message didn't actually render in the health report.

"last_known_check": {
  "state": "outage",
  "error": {},
  "timestamp": "2020-12-10T16:37:23.1725756Z"
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.