Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCollectorStatuses ¶ added in v0.8.1
func GetCollectorStatuses() map[string]ds.CollectorStatus
func NotifyCollectorsNewConnection ¶ added in v0.8.1
func NotifyCollectorsNewConnection()
NotifyCollectorsNewConnection calls OnNewConnection on all registered collectors
func RegisterCollector ¶ added in v0.8.1
func RegisterCollector(c Collector)
func SetCollectorsEnabled ¶ added in v0.8.1
Types ¶
type Collector ¶
type Collector interface {
// CollectorName returns the unique name of the collector
CollectorName() string
Enable()
Disable()
// GetStatus returns the current status of the collector
GetStatus() ds.CollectorStatus
// OnNewConnection is called when a new connection is established
// Collectors that need to send full updates on new connections should implement this
OnNewConnection()
}
Collector defines the interface for collection functionality Implementations: goroutine/goroutine.go, logprocess/logprocess.go, runtimestats/runtimestats.go, watch/watch.go
func GetCollectorByName ¶ added in v0.8.1
type PeriodicExecutor ¶ added in v0.5.0
type PeriodicExecutor struct {
// contains filtered or unexported fields
}
func MakePeriodicExecutor ¶ added in v0.5.0
func MakePeriodicExecutor(name string, dur time.Duration, execFn func()) *PeriodicExecutor
func (*PeriodicExecutor) Disable ¶ added in v0.5.0
func (p *PeriodicExecutor) Disable()
func (*PeriodicExecutor) Enable ¶ added in v0.5.0
func (p *PeriodicExecutor) Enable()
func (*PeriodicExecutor) GetLastErr ¶ added in v0.5.16
func (p *PeriodicExecutor) GetLastErr() error
GetLastErr returns the last error with proper locking
func (*PeriodicExecutor) GetLastExecDuration ¶ added in v0.5.16
func (p *PeriodicExecutor) GetLastExecDuration() int64
GetLastExecDuration returns the duration of the last execution in milliseconds
func (*PeriodicExecutor) IsEnabled ¶ added in v0.5.0
func (p *PeriodicExecutor) IsEnabled() bool
Directories
¶
| Path | Synopsis |
|---|---|
|
Package loginitex provides external process-based log capture functionality
|
Package loginitex provides external process-based log capture functionality |
Click to show internal directories.
Click to hide internal directories.