timemonitor

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TimeMonitor

type TimeMonitor struct {
	sync.RWMutex
	// contains filtered or unexported fields
}

TimeMonitor is used to periodically monitor if time.Now().Sub(refreshTime) is greater than durationThreshold

func NewTimeMonitor

func NewTimeMonitor(name string, durationThreshold, interval time.Duration, metricName string, emitter metrics.MetricEmitter) *TimeMonitor

func (*TimeMonitor) GetRefreshTime

func (m *TimeMonitor) GetRefreshTime() time.Time

func (*TimeMonitor) Run

func (m *TimeMonitor) Run(stopCh <-chan struct{})

Run is blocking runned

func (*TimeMonitor) UpdateRefreshTime

func (m *TimeMonitor) UpdateRefreshTime()

Jump to

Keyboard shortcuts

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