Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DisableLog ¶
func DisableLog()
DisableLog disables all library log output. Logging output is disabled by default until either UseLogger or SetLogWriter are called.
Types ¶
type Config ¶
type Config struct { // Provide the metrics manager with the channels it will listen to for new metrics MinerSolveCount *chan struct{} MinerSolveHashes *chan string MinerSolveTimes *chan time.Duration }
Config is a configuration struct used to initialize a new MetricsManager.
type MetricsManager ¶
type MetricsManager struct {
// contains filtered or unexported fields
}
MetricsManager is used to collect metrics from other managers in code, and make the data available to other systems.
func New ¶
func New(config *Config) (*MetricsManager, error)
New returns a new MetricsManager based on the given config. Use Start() to start processing metrics.
func (*MetricsManager) MinerSolveCount ¶
func (mm *MetricsManager) MinerSolveCount() int64
MinerSolveCount returns the number of solved blocks by the miner(s)
func (*MetricsManager) MinerSolveHashes ¶
func (mm *MetricsManager) MinerSolveHashes() []string
MinerSolveHashes returns the solved-block hash cache
func (*MetricsManager) MinerSolveTimes ¶
func (mm *MetricsManager) MinerSolveTimes() []time.Duration
MinerSolveTimes returns the solve times cache
func (*MetricsManager) Start ¶
func (mm *MetricsManager) Start()
Starts processing metrics in a new goroutine
Click to show internal directories.
Click to hide internal directories.