hostgpuimpl

package
v0.0.0-...-6868c04 Latest Latest
Warning

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

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

Documentation

Overview

Package hostgpuimpl implements a component to generate the 'host_gpu' metadata payload for inventory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Payload

type Payload struct {
	Hostname  string           `json:"hostname"`
	Timestamp int64            `json:"timestamp"`
	Metadata  *hostGPUMetadata `json:"host_gpu_metadata"`
	UUID      string           `json:"uuid"`
}

Payload handles the JSON unmarshalling of the metadata payload

func (*Payload) MarshalJSON

func (p *Payload) MarshalJSON() ([]byte, error)

MarshalJSON serialization a Payload to JSON

func (*Payload) SplitPayload

func (p *Payload) SplitPayload(_ int) ([]marshaler.AbstractMarshaler, error)

SplitPayload implements marshaler.AbstractMarshaler#SplitPayload. In this case, the payload can't be split any further.

type Provides

type Provides struct {
	Comp          hostgpu.Component
	Provider      runnerimpl.Provider
	FlareProvider flaretypes.Provider
	Endpoint      api.AgentEndpointProvider
}

Provides defines the output of the hostgpu component

func NewGPUHostProvider

func NewGPUHostProvider(deps Requires) Provides

NewGPUHostProvider creates a new hostgpu component

type Requires

type Requires struct {
	WMeta      workloadmeta.Component
	Log        log.Component
	Config     config.Component
	Serializer serializer.MetricSerializer
}

Requires defines the dependencies for the hostgpu component

Jump to

Keyboard shortcuts

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