Multi-GPU Collection System: - Add modular GPU collector architecture in collectors/gpu/ - Support AMD (amdgpu), NVIDIA (nvidia-smi), and Intel (i915/xe) GPUs - GPU Manager auto-detects and aggregates all vendor collectors - Backward-compatible JSON output for existing frontend Operational Modes: - Standalone mode (default): single-host monitoring, no database - Server mode: multi-device with database, auth, agents (WIP) - Agent mode: lightweight reporter to central server (WIP) - Mode selection via TYTO_MODE env var or config.yaml Configuration Updates: - Add server config (gRPC port, mTLS settings, registration) - Add agent config (ID, server URL, TLS certificates) - Add database config (SQLite/PostgreSQL support) - Support TYTO_* prefixed environment variables 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
34 lines
923 B
Go
34 lines
923 B
Go
// Package gpu provides multi-vendor GPU metrics collection.
|
|
// It supports AMD, NVIDIA, and Intel GPUs through vendor-specific collectors.
|
|
package gpu
|
|
|
|
import "tyto/internal/models"
|
|
|
|
// Vendor is an alias for models.GPUVendor for internal use.
|
|
type Vendor = models.GPUVendor
|
|
|
|
// Vendor constants for convenience.
|
|
const (
|
|
VendorAMD = models.GPUVendorAMD
|
|
VendorNVIDIA = models.GPUVendorNVIDIA
|
|
VendorIntel = models.GPUVendorIntel
|
|
)
|
|
|
|
// GPUInfo is an alias for models.GPUInfo.
|
|
type GPUInfo = models.GPUInfo
|
|
|
|
// GPUStats is an alias for models.GPUStats.
|
|
type GPUStats = models.GPUStats
|
|
|
|
// Collector is the interface for vendor-specific GPU collectors.
|
|
type Collector interface {
|
|
// Vendor returns the GPU vendor this collector handles.
|
|
Vendor() Vendor
|
|
|
|
// Detect finds all GPUs of this vendor and returns their count.
|
|
Detect() int
|
|
|
|
// Collect gathers metrics for all detected GPUs.
|
|
Collect() ([]GPUInfo, error)
|
|
}
|