health

package
v1.6.3 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

Package health provides handler for health checks.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetVersion added in v0.0.2

func GetVersion() string

GetVersion returns service's version and commit.

func SetupRouter

func SetupRouter(r chi.Router, p ...Pinger)

SetupRouter setups all pingers to /health.

Types

type PingFunc added in v1.1.4

type PingFunc func(ctx context.Context) error

PingFunc is wrapper for raw func.

func (PingFunc) Ping added in v1.1.4

func (f PingFunc) Ping(ctx context.Context) error

Ping ...

type Pinger

type Pinger interface {
	Ping(ctx context.Context) error
}

Pinger pings external service.

type VersionResponse

type VersionResponse struct {
	Version string `json:"version"`
	Commit  string `json:"commit"`
}

VersionResponse ...

Jump to

Keyboard shortcuts

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