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:
parent
50cde8bdf3
commit
d82cd10013
1 changed files with 25 additions and 0 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue