health

package
v0.0.0-...-2c4dd60 Latest Latest
Warning

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

Go to latest
Published: Jun 20, 2022 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckFunc

type CheckFunc func() (unwell bool, meta Meta)

type Meta

type Meta map[string]interface{}

type Nurse

type Nurse struct {
	process.Process
	// contains filtered or unexported fields
}

func NewNurse

func NewNurse(cfg NurseConfig) *Nurse

func (*Nurse) AddCheck

func (n *Nurse) AddCheck(reason string, checkFunc CheckFunc)

func (*Nurse) GatherVitals

func (n *Nurse) GatherVitals(reason string, meta Meta)

func (*Nurse) Start

func (n *Nurse) Start() error

type NurseConfig

type NurseConfig struct {
	ProfileRoot    string
	PollInterval   time.Duration
	GatherDuration time.Duration
	MaxProfileSize utils.FileSize

	CPUProfileRate       int
	MemProfileRate       int
	BlockProfileRate     int
	MutexProfileFraction int

	MemThreshold       utils.FileSize
	GoroutineThreshold int
}

Jump to

Keyboard shortcuts

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