server

package
v0.0.0-...-0d805c2 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2020 License: BSD-2-Clause Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (*http.Server, error)

New returns a new HTTP server with a router mux.

Types

type Error

type Error struct {
	Check   string `json:"check"`
	Message string `json:"message"`
}

Error contains the error returned by an unhealthy service, as well as the service name.

type Healthz

type Healthz struct {
	MongoDBClient *mongo.Client
}

Healthz is a health status middleware.

func (*Healthz) Handler

func (h *Healthz) Handler(w http.ResponseWriter, r *http.Request)

Handler is the health status middleware HTTP handler.

type Response

type Response struct {
	Errors []Error `json:"errors"`
}

Response is the JSON-encoded health check result.

Jump to

Keyboard shortcuts

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