probes

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package probes provides probes functionality via http

Index

Constants

View Source
const (
	// STATE_SUCCESS when the service is in success state
	STATE_SUCCESS string = "SUCCESS" //nolint
	// STATE_FAILED when the service is in a failed state
	STATE_FAILED string = "FAILED" //nolint
	// STATE_UNKNOWN when the service is unknown (default) state
	STATE_UNKNOWN string = "UNKNOWN" //nolint
)
View Source
const (
	TraceTimeSec int64 = 60
)

Variables

This section is empty.

Functions

func GetHeap

func GetHeap(c *fiber.Ctx) error

GetHeap responds to /heap dump requests

func GetTrace

func GetTrace(c *fiber.Ctx) error

GetTrace responds to /trace requests

Types

type ProbesAPI

type ProbesAPI struct {
	Listen string
	Port   uint16
	// contains filtered or unexported fields
}

ProbesAPI configuration for http probes

func NewProbesAPI

func NewProbesAPI(name, listen string, port uint16) (*ProbesAPI, error)

NewProbesAPI creates a new probes server

func (*ProbesAPI) Failed

func (p *ProbesAPI) Failed()

Failed sets state to failed

func (*ProbesAPI) GetHealthz

func (p *ProbesAPI) GetHealthz(c *fiber.Ctx) error

GetHealthz responds to /healthz

func (*ProbesAPI) GetReady

func (p *ProbesAPI) GetReady(c *fiber.Ctx) error

GetReady responds to /ready

func (*ProbesAPI) Shutdown

func (p *ProbesAPI) Shutdown() error

Shutdown shuts down the server

func (*ProbesAPI) Start

func (p *ProbesAPI) Start() error

Start starts the server

func (*ProbesAPI) Success

func (p *ProbesAPI) Success()

Success sets state to success

Jump to

Keyboard shortcuts

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