Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidRefreshIntervalValue = errors.New("invalid refresh interval value")
ErrInvalidRefreshIntervalValue signals that an invalid value for the refresh interval was provided
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