health

package
v0.0.0-...-84d4e1c Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 3, 2019 License: MIT-0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Status string `json:"status"`
}

Health basic health status info

type HealthService

type HealthService struct {
	// contains filtered or unexported fields
}

HealthService represents a simple health check service it defines the routes that we expose for readiness and liveness probes

func New

func New(repo Repo) *HealthService

New creates a new HealthService

func (*HealthService) Get

Health returns the health status of the payments service. This relies on the status of the database, if reachable, then a 200 status code is returned, otherwise, we return a 503 and we rely on the orchestration to supervise us, and shut us down if needed

func (*HealthService) Routes

func (s *HealthService) Routes() *chi.Mux

Routes returns a router with all routes supported by this service

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL