fabricmanager

package
v0.0.1-alpha2 Latest Latest
Warning

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

Go to latest
Published: Aug 20, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

Package fabricmanager tracks the NVIDIA fabric manager version and its activeness. And streams the fabric manager logs for any errors and events.

Index

Constants

View Source
const (
	EventKeyFabricManagerNVSwitchLogUnixSeconds = "fabricmanager_nvswitch_log_unix_seconds"
	EventKeyFabricManagerNVSwitchLogLine        = "fabricmanager_nvswitch_log_line"
	EventKeyFabricManagerNVSwitchLogFilter      = "fabricmanager_nvswitch_log_filter"
	EventKeyFabricManagerNVSwitchLogError       = "fabricmanager_nvswitch_log_error"
)
View Source
const (
	StateNameFabricManager = "fabric_manager"

	StateKeyFabricManagerData           = "data"
	StateKeyFabricManagerEncoding       = "encoding"
	StateValueFabricManagerEncodingJSON = "json"
)
View Source
const Name = "accelerator-nvidia-fabric-manager"

Variables

This section is empty.

Functions

func DefaultLogConfig

func DefaultLogConfig() query_log_config.Config

func New

Types

type Config

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

func ParseConfig

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

func (Config) Validate

func (cfg Config) Validate() error

type Output

type Output struct {
	FabricManager nvidia_query.FabricManagerOutput `json:"fabric_manager"`
}

func ParseOutputJSON

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

func ParseStateFabricManager

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

func ParseStatesToOutput

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

func ToOutput

func ToOutput(i *nvidia_query.Output) *Output

func (*Output) Evaluate

func (o *Output) Evaluate() (string, bool, error)

Returns the output evaluation reason and its healthy-ness.

func (*Output) JSON

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

func (*Output) States

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

Jump to

Keyboard shortcuts

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