subscribers

package
v0.0.0-...-7b722a3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 21, 2025 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package subscribers implements subscribers to workloadmeta.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GPUSubscriber

type GPUSubscriber struct {
	// contains filtered or unexported fields
}

GPUSubscriber is a subscriber that listens for GPU events from workloadmeta

func NewGPUSubscriber

func NewGPUSubscriber(wmeta workloadmeta.Component, tagger tagger.Component) *GPUSubscriber

NewGPUSubscriber creates a new GPUDetector instance

func (*GPUSubscriber) GetGPUTags

func (g *GPUSubscriber) GetGPUTags() map[int32][]string

GetGPUTags creates and returns a mapping of active pids to their associated GPU tags

func (*GPUSubscriber) IsGPUDetected

func (g *GPUSubscriber) IsGPUDetected() bool

IsGPUDetected checks if a GPU has been detected

func (*GPUSubscriber) Run

func (g *GPUSubscriber) Run(_ context.Context) error

Run starts the GPU detector, which listens for workloadmeta events to detect GPUs on the host

func (*GPUSubscriber) SetGPUDetected

func (g *GPUSubscriber) SetGPUDetected(value bool)

SetGPUDetected sets the GPU detected status

func (*GPUSubscriber) Stop

func (g *GPUSubscriber) Stop(_ context.Context) error

Stop stops the GPU detector

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL