Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

Checker

GoReference

Checker provides simple liveness and readiness checkers. You can use this package to configure Kubernetes probes.

Checkers

HTTP

Creates a simple HTTP server listening on port 8080 with only GET:/live and GET:/ready endpoints. It takes liveness and readiness functions as parameters. Each parameter is a ckeckFunc function. It simply returns an error if the probe fails.

Example:

// Use a separate coroutine
go checker.HTTP(
  func() error {
    if !app.Ready() {
      return errors.New("App is not ready")
    }

    return nil
  },
  func() error {
    if !app.Live() {
      return errors.New("App is not live")
    }

    return nil
  },
)

About

Minimalist Go liveness and readiness checker

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Used by

Contributors

Languages