mirror of
https://github.com/prometheus-community/windows_exporter.git
synced 2026-10-20 19:49:03 +02:00
headers: fail Build on missing native exports and assert MI/COM layouts (#2739)
Signed-off-by: Jan-Otto Kröpke <mail@jkroepke.de>
This commit is contained in:
@@ -159,6 +159,10 @@ func (c *Collector) Close() error {
|
||||
}
|
||||
|
||||
func (c *Collector) Build(logger *slog.Logger, _ *mi.Session) error {
|
||||
if err := errors.Join(gdi32.Load(), cfgmgr32.Load()); err != nil {
|
||||
return fmt.Errorf("GPU APIs not available: %w", err)
|
||||
}
|
||||
|
||||
var err error
|
||||
|
||||
c.logger = logger.With(slog.String("collector", Name))
|
||||
|
||||
Reference in New Issue
Block a user