Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrInvalidRoundDuration = errors.New("invalid round duration")
ErrInvalidRoundDuration signals that an invalid round duration was provided
var ErrInvalidShardId = errors.New("invalid shard id")
ErrInvalidShardId signals that the shard id is invalid
var ErrNilConfig = errors.New("nil config")
ErrNilConfig signals that a nil config was provided
var ErrNilInitialTPSBenchmarks = errors.New("nil initial TPS benchmarks")
ErrNilInitialTPSBenchmarks signals that nil TPS benchmarks have been provided
var ErrNilPathHandler = errors.New("nil path handler")
ErrNilPathHandler signals that a nil path handler was provided
var ErrNilStatusHandler = errors.New("nil status handler")
ErrNilStatusHandler signals that a nil status handler has been 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
Types ¶
type ResourceMonitor ¶
type ResourceMonitor struct {
// contains filtered or unexported fields
}
ResourceMonitor outputs statistics about resources used by the binary
func NewResourceMonitor ¶
func NewResourceMonitor(config *config.Config, pathManager storage.PathManagerHandler, shardId string) (*ResourceMonitor, error)
NewResourceMonitor creates a new ResourceMonitor instance
func (*ResourceMonitor) Close ¶
func (rm *ResourceMonitor) Close() error
Close closes all underlying components
func (*ResourceMonitor) GenerateStatistics ¶
func (rm *ResourceMonitor) GenerateStatistics() []interface{}
GenerateStatistics creates a new statistic string
func (*ResourceMonitor) IsInterfaceNil ¶
func (rm *ResourceMonitor) IsInterfaceNil() bool
IsInterfaceNil returns true if underlying object is nil
func (*ResourceMonitor) SaveStatistics ¶
func (rm *ResourceMonitor) SaveStatistics()
SaveStatistics generates and saves statistic data on the disk
func (*ResourceMonitor) StartMonitoring ¶
func (rm *ResourceMonitor) StartMonitoring()
StartMonitoring starts the monitoring process for saving statistics
type ResourceMonitorHandler ¶
type ResourceMonitorHandler interface { GenerateStatistics() []interface{} SaveStatistics() 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