Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ThresholdExecute ¶
type ThresholdExecute[ITEM any] struct { // contains filtered or unexported fields }
ThresholdExecute 阈值执行, 超过阈值就执行
func NewThresholdExecute ¶
func NewThresholdExecute[ITEM any](periodic time.Duration, itemDo func(i int, item *ITEM)) *ThresholdExecute[ITEM]
func (*ThresholdExecute[ITEM]) Collect ¶
func (exec *ThresholdExecute[ITEM]) Collect(item *ITEM)
Collect 收集数据
func (*ThresholdExecute[ITEM]) SetRecover ¶
func (pe *ThresholdExecute[ITEM]) SetRecover(recoverDo func(ierr any))
Click to show internal directories.
Click to hide internal directories.