pkg

package
v0.0.0-...-6ac6f58 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RulesFileName            = "bk_monitor_rules.json"
	DevOPSProcessTreeKillKey = "DEVOPS_DONT_KILL_PROCESS_TREE"

	DefautInterval = 20000

	BlockSecondsWhenRecover = 240

	MacroKillTree = "${BK_KILL_TREE}"
)

Variables

View Source
var (
	ErrorRuleSettingNotExisted = fmt.Errorf("not found rules file")
	ErrFileLock                = fmt.Errorf("lock file failed")
)

Functions

func KillChildren

func KillChildren(p *process.Process)

KillChildren kill all process children of given process

func KillProcess

func KillProcess(p *process.Process) error

func Lock

func Lock() bool

func Unlock

func Unlock()

Types

type Monitor

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

Monitor to check other bk-dist process status

func NewMonitor

func NewMonitor(rf string) *Monitor

NewMonitor get a new idle loop instance

func (*Monitor) Run

func (m *Monitor) Run(ctx context.Context) (int, error)

Run brings up idle loop

Jump to

Keyboard shortcuts

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