diff --git a/pkg/mining/mining.go b/pkg/mining/mining.go index 2934da0..f75815a 100644 --- a/pkg/mining/mining.go +++ b/pkg/mining/mining.go @@ -54,7 +54,7 @@ type InstallationDetails struct { ConfigPath string `json:"config_path,omitempty"` // Add path to the miner-specific config } -// SystemInfo provides general system and miner installation information. +// info := SystemInfo{OS: "linux", Architecture: "amd64", AvailableCPUCores: 8} type SystemInfo struct { Timestamp time.Time `json:"timestamp"` OS string `json:"os"` @@ -246,20 +246,20 @@ type PerformanceMetrics struct { ExtraData map[string]interface{} `json:"extraData,omitempty"` } -// HashratePoint represents a single hashrate measurement at a specific time. +// point := HashratePoint{Timestamp: time.Now(), Hashrate: 1500} type HashratePoint struct { Timestamp time.Time `json:"timestamp"` Hashrate int `json:"hashrate"` } -// API represents the miner's API configuration. +// api := API{Enabled: true, ListenHost: "127.0.0.1", ListenPort: 18080} type API struct { Enabled bool `json:"enabled"` ListenHost string `json:"listenHost"` ListenPort int `json:"listenPort"` } -// XMRigSummary represents the full JSON response from the XMRig API. +// summary := XMRigSummary{}; json.Unmarshal(body, &summary); fmt.Println(summary.Hashrate.Highest) type XMRigSummary struct { ID string `json:"id"` WorkerID string `json:"worker_id"` @@ -337,7 +337,7 @@ type XMRigSummary struct { Hugepages []int `json:"hugepages"` } -// AvailableMiner represents a miner that is available for use. +// miner := AvailableMiner{Name: "xmrig", Description: "CPU/GPU miner for RandomX"} type AvailableMiner struct { Name string `json:"name"` Description string `json:"description"`