Documentation ¶
Overview ¶
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Copyright © 2024 Macaroni OS Linux See AUTHORS and LICENSE for the license details and contributors.
Index ¶
- Constants
- func GenDefault(viper *v.Viper)
- type CGeneral
- type CLogging
- type CNvidia
- type Config
- type EglExternalPlatformFiles
- type ICDJson
- type ICDJsonData
- type JsonFile
- type KernelModule
- type Library
- type NVIDIADriver
- type NVIDIASetup
- func (n *NVIDIASetup) GetDriver(v string) *NVIDIADriver
- func (n *NVIDIASetup) GetKernelModulesActive(nv, kv string) *KernelModule
- func (n *NVIDIASetup) GetKernelModulesAvailable(nv string, open bool) *[]*KernelModule
- func (n *NVIDIASetup) HasVersion(v string) bool
- func (n *NVIDIASetup) SetVersion(v string)
- type System
- func (s *System) GetEglLoader(jsonfile string) (*EglExternalPlatformFiles, *JsonFile)
- func (s *System) GetGBMLibrary(lib string) *Library
- func (s *System) GetNvidia() *NVIDIASetup
- func (s *System) GetVulkanIcdFile(jsonfile string) (*EglExternalPlatformFiles, *JsonFile)
- func (s *System) GetVulkanLayerFile(jsonfile string) (*VulkanLayersFiles, *VulkanLayersFile)
- func (s *System) Json() ([]byte, error)
- func (s *System) Yaml() ([]byte, error)
- type VulkanLayersFile
- type VulkanLayersFiles
Constants ¶
const ( GPUCONF_ENV_PREFIX = "GPUCONF" GPUCONF_VERSION = "0.2.8" )
Variables ¶
This section is empty.
Functions ¶
func GenDefault ¶
Types ¶
type CGeneral ¶
type CGeneral struct { Debug bool `mapstructure:"debug,omitempty" json:"debug,omitempty" yaml:"debug,omitempty"` Backend string `mapstructure:"backend,omitempty" json:"backend,omitempty" yaml:"backend,omitempty"` }
func (*CGeneral) GetBackendType ¶
type CLogging ¶
type CLogging struct { // Path of the logfile Path string `mapstructure:"path,omitempty" json:"path,omitempty" yaml:"path,omitempty"` // Enable/Disable logging to file EnableLogFile bool `mapstructure:"enable_logfile,omitempty" json:"enable_logfile,omitempty" yaml:"enable_logfile,omitempty"` // Enable JSON format logging in file JsonFormat bool `mapstructure:"json_format,omitempty" json:"json_format,omitempty" yaml:"json_format,omitempty"` // Log level Level string `mapstructure:"level,omitempty" json:"level,omitempty" yaml:"level,omitempty"` // Enable emoji EnableEmoji bool `mapstructure:"enable_emoji,omitempty" json:"enable_emoji,omitempty" yaml:"enable_emoji,omitempty"` // Enable/Disable color in logging Color bool `mapstructure:"color,omitempty" json:"color,omitempty" yaml:"color,omitempty"` }
type CNvidia ¶ added in v0.2.0
type CNvidia struct { // Enable/Disable GBM library/Backend EnableGbmlib bool `mapstructure:"enable_gbmlib,omitempty" json:"enable_gbmlib,omitempty" yaml:"enable_gbmlib,omitempty"` }
type Config ¶
type Config struct { Viper *v.Viper `yaml:"-" json:"-"` General CGeneral `mapstructure:"general" json:"general,omitempty" yaml:"general,omitempty"` Logging CLogging `mapstructure:"logging" json:"logging,omitempty" yaml:"logging,omitempty"` Nvidia CNvidia `mapstructure:"nvidia,omitempty" json:"nvidia,omitempty" yaml:"nvidia,omitempty"` }
func (*Config) GetGeneral ¶
func (*Config) GetLogging ¶
type EglExternalPlatformFiles ¶
type EglExternalPlatformFiles struct { Path string `json:"path" yaml:"path"` Files map[string]*JsonFile `json:"files,omitempty" yaml:"files,omitempty"` }
func NewEglExternalPlatformFiles ¶
func NewEglExternalPlatformFiles(dir string) *EglExternalPlatformFiles
func (*EglExternalPlatformFiles) AddFile ¶
func (e *EglExternalPlatformFiles) AddFile(file string, jsonfile *JsonFile)
type ICDJson ¶
type ICDJson struct { FileFormatVersion string `json:"file_format_version" yaml:"file_format_version"` ICD ICDJsonData `json:"ICD" yaml:"ICD"` }
func NewICDJson ¶
type ICDJsonData ¶
type JsonFile ¶
type JsonFile struct { Name string `json:"name" yaml:"name"` Disabled bool `json:"disabled,omitempty" yaml:"disabled,omitempty"` File *ICDJson `json:"file,omitempty" yaml:"file,omitempty"` }
func NewJsonFile ¶
type KernelModule ¶
type KernelModule struct { Path string `json:"path,omitempty" yaml:"path,omitempty"` KernelVersion string `json:"kernel_version,omitempty" yaml:"kernel_version,omitempty"` Fields map[string]string `json:"fields,omitempty" yaml:"fields,omitempty"` Name string `json:"name,omitempty" yaml:"name,omitempty"` }
func (*KernelModule) GetFieldLicense ¶ added in v0.2.0
func (km *KernelModule) GetFieldLicense() string
func (*KernelModule) GetFieldVersion ¶
func (km *KernelModule) GetFieldVersion() string
func (*KernelModule) IsOpen ¶ added in v0.2.0
func (km *KernelModule) IsOpen() bool
func (*KernelModule) Yaml ¶ added in v0.2.0
func (km *KernelModule) Yaml() ([]byte, error)
type NVIDIADriver ¶
type NVIDIASetup ¶
type NVIDIASetup struct { Drivers []*NVIDIADriver `json:"drivers,omitempty" yaml:"drivers,omitempty"` VersionActive string `json:"version_active,omitempty" yaml:"version_active,omitempty"` KModuleAvailable []*KernelModule `json:"kernel_modules,omitempty" yaml:"kernel_modules,omitempty"` KModuleActive []*KernelModule `json:"kernel_modules_active,omitempty" yaml:"kernel_modules_active,omitempty"` KOpenModuleAvailable []*KernelModule `json:"kernel_open_modules,omitempty" yaml:"kernel_open_modules,omitempty"` KOpenModuleActive []*KernelModule `json:"kernel_open_modules_active,omitempty" yaml:"kernel_open_modules_active,omitempty"` }
func NewNVIDIASetup ¶
func NewNVIDIASetup() *NVIDIASetup
func (*NVIDIASetup) GetDriver ¶
func (n *NVIDIASetup) GetDriver(v string) *NVIDIADriver
func (*NVIDIASetup) GetKernelModulesActive ¶ added in v0.2.0
func (n *NVIDIASetup) GetKernelModulesActive(nv, kv string) *KernelModule
func (*NVIDIASetup) GetKernelModulesAvailable ¶ added in v0.2.0
func (n *NVIDIASetup) GetKernelModulesAvailable(nv string, open bool) *[]*KernelModule
func (*NVIDIASetup) HasVersion ¶
func (n *NVIDIASetup) HasVersion(v string) bool
func (*NVIDIASetup) SetVersion ¶ added in v0.2.0
func (n *NVIDIASetup) SetVersion(v string)
type System ¶
type System struct { EglExtPlatformDirs []*EglExternalPlatformFiles `json:"egl_external_platforms_dirs,omitempty" yaml:"egl_external_platforms_dirs,omitempty"` VulkanLayersDirs []*VulkanLayersFiles `json:"vulkan_layers_dirs,omitempty" yaml:"vulkan_layers_dirs,omitempty"` VulkanICDDirs []*EglExternalPlatformFiles `json:"vulkan_icd_dirs,omitempty" yaml:"vulkan_icd_dirs,omitempty"` GbmLibraries []*Library `json:"gbm_libs,omitempty" yaml:"gbm_libs,omitempty"` Nvidia *NVIDIASetup `json:"nvidia,omitempty" yaml:"nvidia,omitempty"` }
func (*System) GetEglLoader ¶
func (s *System) GetEglLoader(jsonfile string) (*EglExternalPlatformFiles, *JsonFile)
func (*System) GetGBMLibrary ¶
func (*System) GetNvidia ¶ added in v0.2.0
func (s *System) GetNvidia() *NVIDIASetup
func (*System) GetVulkanIcdFile ¶
func (s *System) GetVulkanIcdFile(jsonfile string) (*EglExternalPlatformFiles, *JsonFile)
func (*System) GetVulkanLayerFile ¶
func (s *System) GetVulkanLayerFile(jsonfile string) (*VulkanLayersFiles, *VulkanLayersFile)
type VulkanLayersFile ¶
type VulkanLayersFile struct { Name string `json:"name" yaml:"name"` Disabled bool `json:"disabled,omitempty" yaml:"disabled,omitempty"` Content map[string]interface{} `json:"content,omitempty" yaml:"content,omitempty"` }
func NewVulkanLayersFile ¶
func NewVulkanLayersFile(n string) *VulkanLayersFile
type VulkanLayersFiles ¶
type VulkanLayersFiles struct { Path string `json:"path" yaml:"path"` Files map[string]*VulkanLayersFile `json:"files,omitempty" yaml:"files,omitempty"` }
func NewVulkanLayersFiles ¶
func NewVulkanLayersFiles(dir string) *VulkanLayersFiles