gspfirmwaremode

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package gspfirmwaremode tracks the NVIDIA GSP firmware mode.

Index

Constants

View Source
const (
	StateNameGSPFirmwareMode = "gsp_firmware_mode"

	StateKeyGSPFirmwareModeData       = "data"
	StateKeyGSPFirmwareModeEncoding   = "encoding"
	StateValueMemoryUsageEncodingJSON = "json"
)

Variables

This section is empty.

Functions

func New

Types

type Config

type Config struct {
	Query query_config.Config `json:"query"`
}

func ParseConfig

func ParseConfig(b any, db *sql.DB) (*Config, error)

func (Config) Validate

func (cfg Config) Validate() error

type Output

type Output struct {
	GSPFirmwareModesNVML []nvidia_query_nvml.GSPFirmwareMode `json:"gsp_firmware_modes_nvml"`
}

func ParseOutputJSON

func ParseOutputJSON(data []byte) (*Output, error)

func ParseStatePersistenceMode

func ParseStatePersistenceMode(m map[string]string) (*Output, error)

func ParseStatesToOutput

func ParseStatesToOutput(states ...components.State) (*Output, error)

func ToOutput

func ToOutput(i *nvidia_query.Output) *Output

ToOutput converts nvidia_query.Output to Output. It returns an empty non-nil object, if the input or the required field is nil (e.g., i.SMI).

func (*Output) JSON

func (o *Output) JSON() ([]byte, error)

func (*Output) States

func (o *Output) States() ([]components.State, error)

Directories

Path Synopsis
Package id defines the GSP firmware component ID.
Package id defines the GSP firmware component ID.

Jump to

Keyboard shortcuts

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