monitor

package
v3.2.10 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2024 License: MIT Imports: 13 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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

func (s *Agent) RegisterCallback(callback Callback)

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

func (*Agent) Start

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

type Callback

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