health

package
v0.16.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LivePath  = "/livez"
	ReadyPath = "/readyz"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

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

func New

func New(readyF func(context.Context) error) *Module

func (*Module) LiveGETRequest

func (m *Module) LiveGETRequest(c *gin.Context)

LiveGETRequest swagger:operation GET /livez liveGet

Returns code 200 with no body if GoToSocial is "live", ie., able to respond to HTTP requests.

---
tags:
- health

responses:
	'200':
		description: OK

func (*Module) LiveHEADRequest

func (m *Module) LiveHEADRequest(c *gin.Context)

LiveHEADRequest swagger:operation HEAD /livez liveHead

Returns code 200 if GoToSocial is "live", ie., able to respond to HTTP requests.

---
tags:
- health

responses:
	'200':
		description: OK

func (*Module) ReadyGETRequest

func (m *Module) ReadyGETRequest(c *gin.Context)

ReadyGETRequest swagger:operation GET /readyz readyGet

Returns code 200 with no body if GoToSocial is "ready", ie., able to connect to the database backend and do a simple SELECT.

If GtS is not ready, 500 Internal Error will be returned, and an error will be logged (but not returned to the caller, to avoid leaking internals).

---
tags:
- health

responses:
	'200':
		description: OK
	'500':
		description: Not ready. Check logs for error message.

func (*Module) ReadyHEADRequest

func (m *Module) ReadyHEADRequest(c *gin.Context)

ReadyHEADRequest swagger:operation HEAD /readyz readyHead

Returns code 200 with no body if GoToSocial is "ready", ie., able to connect to the database backend and do a simple SELECT.

If GtS is not ready, 500 Internal Error will be returned, and an error will be logged (but not returned to the caller, to avoid leaking internals).

---
tags:
- health

responses:
	'200':
		description: OK

func (*Module) Route

func (m *Module) Route(attachHandler func(method string, path string, f ...gin.HandlerFunc) gin.IRoutes)

Jump to

Keyboard shortcuts

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