health

package
v0.10.0-alpha.7 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2017 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	Metrics *metrics.MetricsManager
	H       *herodot.JSONWriter
	W       firewall.Firewall
}

func (*Handler) Health

func (h *Handler) Health(rw http.ResponseWriter, r *http.Request, _ httprouter.Params)

swagger:route GET /health/status health getInstanceStatus

Check health status of this instance

This endpoint returns `{ "status": "ok" }`. This status let's you know that the HTTP server is up and running. This status does currently not include checks whether the database connection is up and running. This endpoint does not require the `X-Forwarded-Proto` header when TLS termination is set.

Be aware that if you are running multiple nodes of ORY Hydra, the health status will never refer to the cluster state, only to a single instance.

Responses:
  200: healthStatus
  500: genericError

func (*Handler) SetRoutes

func (h *Handler) SetRoutes(r *httprouter.Router)

func (*Handler) Statistics added in v0.9.10

func (h *Handler) Statistics(w http.ResponseWriter, r *http.Request, ps httprouter.Params)

swagger:route GET /health/metrics health getInstanceMetrics

Show instance metrics (experimental)

This endpoint returns an instance's metrics, such as average response time, status code distribution, hits per second and so on. The return values are currently not documented as this endpoint is still experimental.

The subject making the request needs to be assigned to a policy containing:

```

{
  "resources": ["rn:hydra:health:stats"],
  "actions": ["get"],
  "effect": "allow"
}

```

Consumes:
- application/json

Produces:
- application/json

Schemes: http, https

Security:
  oauth2: hydra.health

Responses:
  200: emptyResponse
  401: genericError
  403: genericError
  500: genericError

Jump to

Keyboard shortcuts

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