statistics

package
v1.4.10 Latest Latest
Warning

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

Go to latest
Published: Feb 24, 2023 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidRefreshIntervalValue = errors.New("invalid refresh interval value")

ErrInvalidRefreshIntervalValue signals that an invalid value for the refresh interval was provided

View Source
var ErrNilNetworkStatisticsProvider = errors.New("nil network statistics provider")

ErrNilNetworkStatisticsProvider signals that a nil network statistics provider was provided

Functions

func GetRuntimeStatistics

func GetRuntimeStatistics() []interface{}

GetRuntimeStatistics will return the statistics regarding the current time, memory consumption and the number of running go routines These return statistics can be easily output in a log line

func NewResourceMonitor

func NewResourceMonitor(config config.Config, netStats NetworkStatisticsProvider) (*resourceMonitor, error)

NewResourceMonitor creates a new ResourceMonitor instance

Types

type NetworkStatisticsProvider

type NetworkStatisticsProvider interface {
	TotalSentInCurrentEpoch() string
	TotalReceivedInCurrentEpoch() string
	EpochConfirmed(epoch uint32, timestamp uint64)
	IsInterfaceNil() bool
}

NetworkStatisticsProvider is able to provide network statistics

type ResourceMonitorHandler

type ResourceMonitorHandler interface {
	GenerateStatistics() []interface{}
	StartMonitoring()
	Close() error
	IsInterfaceNil() bool
}

ResourceMonitorHandler defines the resource monitor supported actions

type SoftwareVersionChecker

type SoftwareVersionChecker interface {
	StartCheckSoftwareVersion()
	IsInterfaceNil() bool
	Close() error
}

SoftwareVersionChecker holds the actions needed to be handled by a components which will check the software version

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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