monitor

package
v3.0.0-...-7b6adf0 Latest Latest
Warning

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

Go to latest
Published: Aug 30, 2024 License: MIT Imports: 13 Imported by: 0

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