v1

package
v0.8.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const Version = "v1"

Version indicates the version of the 'Spec' struct used to hold information on 'MigConfigs'.

Variables

This section is empty.

Functions

This section is empty.

Types

type MigConfigSpec

type MigConfigSpec struct {
	DeviceFilter interface{}     `json:"device-filter,omitempty" yaml:"device-filter,flow,omitempty"`
	Devices      interface{}     `json:"devices"                 yaml:"devices,flow"`
	MigEnabled   bool            `json:"mig-enabled"             yaml:"mig-enabled"`
	MigDevices   types.MigConfig `json:"mig-devices"             yaml:"mig-devices"`
}

MigConfigSpec defines the spec to declare the desired MIG configuration for a set of GPUs.

func (*MigConfigSpec) MatchesAllDevices added in v0.4.0

func (ms *MigConfigSpec) MatchesAllDevices() bool

MatchesAllDevices checks a 'MigConfigSpec' to see if it matches on 'all' devices.

func (*MigConfigSpec) MatchesDeviceFilter

func (ms *MigConfigSpec) MatchesDeviceFilter(deviceID types.DeviceID) bool

MatchesDeviceFilter checks a 'MigConfigSpec' to see if its device filter matches the provided 'deviceID'.

func (*MigConfigSpec) MatchesDevices

func (ms *MigConfigSpec) MatchesDevices(index int) bool

MatchesDevices checks a 'MigConfigSpec' to see if it matches on a device at the specified 'index'.

func (*MigConfigSpec) UnmarshalJSON

func (s *MigConfigSpec) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals raw bytes into a 'MigConfigSpec'.

type MigConfigSpecSlice

type MigConfigSpecSlice []MigConfigSpec

MigConfigSpecSlice represents a slice of 'MigConfigSpec'.

type Spec

type Spec struct {
	Version    string                        `json:"version"               yaml:"version"`
	MigConfigs map[string]MigConfigSpecSlice `json:"mig-configs,omitempty" yaml:"mig-configs,omitempty"`
}

Spec is a versioned struct used to hold information on 'MigConfigs'.

func (*Spec) UnmarshalJSON

func (s *Spec) UnmarshalJSON(b []byte) error

UnmarshalJSON unmarshals raw bytes into a versioned 'Spec'.

Jump to

Keyboard shortcuts

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