monitor

package
v3.2.7 Latest Latest
Warning

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

Go to latest
Published: May 10, 2024 License: MIT Imports: 12 Imported by: 1

Documentation

Overview

Package monitor implements a goroutine based monitoring for detecting stuck scanner processes and dumping stack and other relevant information for investigation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

Agent is an agent for monitoring hanging programs

func NewStackMonitor

func NewStackMonitor() *Agent

NewStackMonitor returns a new stack monitor instance

func (*Agent) RegisterCallback added in v3.1.6

func (s *Agent) RegisterCallback(callback Callback)

RegisterCallback adds a callback to perform additional operations before bailing out.

func (*Agent) Start added in v3.1.6

func (s *Agent) Start(interval time.Duration) context.CancelFunc

type Callback added in v3.1.6

type Callback func(dumpID string) error

Callback when crash is detected and stack trace is saved to disk

Jump to

Keyboard shortcuts

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