health

package
v0.0.0-...-3f71ca0 Latest Latest
Warning

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

Go to latest
Published: May 2, 2024 License: Apache-2.0 Imports: 14 Imported by: 15

Documentation

Index

Constants

View Source
const (
	InfluxStatusOK = "pass"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check func(context.Context) error

func Influx

func Influx(client influxdb2.Client) Check

Influx do a healtheck in influx Cloud version.

func InfluxOSS

func InfluxOSS(client influxdb2.Client) Check

InfluxOSS do a healtheckIN influx OSS version.

func Mongo

func Mongo(db *mongo.Database) Check

func Noop

func Noop() Check

func Redis

func Redis(client *redis.Client) Check

Redis does a ping.

func SNS

func SNS(config aws.Config, url string) Check

func SQS

func SQS(config aws.Config, url string) Check

type Controller

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

Controller definition.

func NewController

func NewController(checks []Check, logger *zap.Logger) *Controller

NewController creates a Controller instance.

func (*Controller) HealthCheck

func (c *Controller) HealthCheck(ctx *fiber.Ctx) error

HealthCheck handler for the endpoint /health.

func (*Controller) ReadyCheck

func (c *Controller) ReadyCheck(ctx *fiber.Ctx) error

ReadyCheck handler for the endpoint /ready.

type HealthCheck

type HealthCheck struct {
	Status string `json:"status"`
}

type ReadyCheck

type ReadyCheck struct {
	Ready string `json:"ready"`
}

Jump to

Keyboard shortcuts

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