From d82cd100132d29b33ec4dfdee49e68fbcea99574 Mon Sep 17 00:00:00 2001 From: snider Date: Wed, 31 Dec 2025 11:13:40 +0000 Subject: [PATCH] docs: Document logical groupings in Miner interface MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- pkg/mining/mining.go | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/pkg/mining/mining.go b/pkg/mining/mining.go index eda05c4..4dc6dde 100644 --- a/pkg/mining/mining.go +++ b/pkg/mining/mining.go @@ -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 }