monitor

package
v0.0.0-...-63bff7e Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Monitor

func Monitor(
	scheduler sched.Scheduler,
	checkInterval time.Duration,
	summarizeInterval time.Duration,
	maxIdleCount uint,
	autoStop bool,
	record Record) <-chan uint64

Monitor 用于监控调度器。 参数scheduler代表作为监控目标的调度器。 参数checkInterval代表检查间隔时间,单位:纳秒。 参数summarizeInterval代表摘要获取间隔时间,单位:纳秒。 参数maxIdleCount代表最大空闲计数。 参数autoStop被用来指示该方法是否在调度器空闲足够长的时间之后自行停止调度器。 参数record代表日志记录函数。 当监控结束之后,该方法会向作为唯一结果值的通道发送一个代表了空闲状态检查次数的数值。

Types

type Record

type Record func(level uint8, content string)

Record 代表日志记录函数的类型。 参数level代表日志级别。级别设定:0-普通;1-警告;2-错误。

Jump to

Keyboard shortcuts

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