tool

package
v0.0.0-...-e8b1dc9 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Monitoring

func Monitoring(scheduler sched.Scheduler, intervalNs time.Duration, maxIdleCount uint, autoStop bool, detailSummary bool, record Record) <-chan uint64

Monitoring 调度器监控函数。 参数scheduler代表作为监控目标的调度器。 参数intervalNs代表检查间隔时间,单位:纳秒。 参数maxIdleCount代表最大空闲计数。 参数autoStop被用来指示该方法是否在调度器空闲一段时间(即持续空闲时间,由intervalNs * maxIdleCount得出)之后自行停止调度器。 参数detailSummary被用来表示是否需要详细的摘要信息。 参数record代表日志记录函数。 当监控结束之后,该方法会会向作为唯一返回值的通道发送一个代表了空闲状态检查次数的数值。

Types

type Record

type Record func(level byte, content string)

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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