healthcheck

package
v3.0.0-beta.2 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2019 License: OSL-3.0 Imports: 7 Imported by: 6

README

Healthcheck Module

The healthcheck module provides useful routes for:

  1. check if the application is up (/status/ping endpoint)
  2. Check the application status (/status/healthcheck endpoint)

Usage

The healthcheck module requires the systemendpoint module and its second server.

If you use the default configuration you should then see an ok when calling http://localhost:13210/status/ping

Healthcheck

The healthcheck endpoint allows to check different "things" from the view of your application. There are some available checks that you can activate by config:

healthcheck.checkSession: true
healthcheck.checkAuth: true
Implement own Checks:

Just Implement the healthcheck.Status interface and register it via Dingo mapbinding:

injector.BindMap(new(healthcheck.Status), "session").To(healthcheck.RedisSession{})

Documentation

Overview

Package healthcheck provides a healthcheck endpoint under the default route /status/healthcheck Usage: Register your own Status via Dingo: injector.BindMap(new(healthcheck.Status), "yourServiceName").To(yourServiceNameApi.Status{})

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

Module entry point for the flamingo healthcheck module

func (*Module) Configure

func (m *Module) Configure(injector *dingo.Injector)

Configure dependency injection

func (*Module) DefaultConfig

func (m *Module) DefaultConfig() config.Map

DefaultConfig for healthcheck module

func (*Module) Depends

func (m *Module) Depends() []dingo.Module

Depends on other modules

func (*Module) Inject

func (m *Module) Inject(
	controller *controllers.Healthcheck,
	config *struct {
		CheckSession    bool   `inject:"config:healthcheck.checkSession"`
		CheckAuthServer bool   `inject:"config:healthcheck.checkAuth"`
		CheckPath       string `inject:"config:healthcheck.checkPath"`
		PingPath        string `inject:"config:healthcheck.pingPath"`
		SessionBackend  string `inject:"config:session.backend"`
	},
)

Inject dependencies

Directories

Path Synopsis
domain
interfaces

Jump to

Keyboard shortcuts

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