docs: Document logical groupings in Miner interface

Add comprehensive documentation comments to the Miner interface
explaining the logical grouping of methods:
- Lifecycle: Install, Uninstall, Start, Stop
- Stats: GetStats
- Info: GetName, GetPath, GetBinaryPath, CheckInstallation, GetLatestVersion
- History: GetHashrateHistory, AddHashratePoint, ReduceHashrateHistory
- IO: GetLogs, WriteStdin

This documents the interface structure without introducing breaking
changes from actual interface splitting.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
snider 2025-12-31 11:13:40 +00:00
parent 50cde8bdf3
commit d82cd10013

View file

@ -13,20 +13,45 @@ const (
)
// Miner defines the standard interface for a cryptocurrency miner.
// The interface is logically grouped into focused capabilities:
//
// Lifecycle - Installation and process management:
// - Install, Uninstall, Start, Stop
//
// Stats - Performance metrics collection:
// - GetStats
//
// Info - Miner identification and installation details:
// - GetName, GetPath, GetBinaryPath, CheckInstallation, GetLatestVersion
//
// History - Hashrate history management:
// - GetHashrateHistory, AddHashratePoint, ReduceHashrateHistory
//
// IO - Interactive input/output:
// - GetLogs, WriteStdin
type Miner interface {
// Lifecycle operations
Install() error
Uninstall() error
Start(config *Config) error
Stop() error
// Stats operations
GetStats(ctx context.Context) (*PerformanceMetrics, error)
// Info operations
GetName() string
GetPath() string
GetBinaryPath() string
CheckInstallation() (*InstallationDetails, error)
GetLatestVersion() (string, error)
// History operations
GetHashrateHistory() []HashratePoint
AddHashratePoint(point HashratePoint)
ReduceHashrateHistory(now time.Time)
// IO operations
GetLogs() []string
WriteStdin(input string) error
}