services

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2022 License: Apache-2.0 Imports: 6 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Health

type Health struct {
	Start time.Time
	Info  build.Information
}

Health reports on the health of the service as a whole.

func (Health) Name

func (Health) Name() string

Name returns the name of the service.

func (Health) Register

func (h Health) Register(router *mux.Router)

Register sets up the http handler for this service with the given router.

func (Health) Shutdown

func (Health) Shutdown()

Shutdown is a no-op since there no long running processes for this service.

type HealthResponse

type HealthResponse struct {
	Data struct {
		Name    string `json:"name"`
		Version string `json:"version"`
		Build   struct {
			Branch string `json:"branch"`
			Commit string `json:"commit"`
			Date   string `json:"date"`
			Go     string `json:"go"`
		}
		Uptime string `json:"uptime"`
	}
}

HealthRespones defines the response to the health endpoint.

type Metrics

type Metrics struct{}

Metrics that reports the metrics of the service.

func (Metrics) Name

func (Metrics) Name() string

Name returns the name of the service.

func (Metrics) Register

func (Metrics) Register(router *mux.Router)

Register sets up the http handler for this service with the given router.

func (Metrics) Shutdown

func (Metrics) Shutdown()

Shutdown is a no-op since there are no long running processes.

Jump to

Keyboard shortcuts

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