Documentation
¶
Overview ¶
Package config provides the gpud configuration data for the server.
Index ¶
Constants ¶
View Source
const ( DefaultAPIVersion = "v1" DefaultGPUdPort = 15132 )
Variables ¶
View Source
var ( DefaultRefreshPeriod = metav1.Duration{Duration: time.Minute} // keep the metrics only for the last 3 hours DefaultRetentionPeriod = metav1.Duration{Duration: 3 * time.Hour} // compact/vacuum is disruptive to existing queries (including reads) // but necessary to keep the state database from growing indefinitely // TODO: disabled for now, until we have a better way to detect the performance issue DefaultCompactPeriod = metav1.Duration{Duration: 0} )
Functions ¶
func DefaultFifoFile ¶
func DefaultStateFile ¶
Types ¶
type Config ¶
type Config struct {
APIVersion string `json:"api_version"`
// Address for the server to listen on.
Address string `json:"address"`
// State file that persists the latest status.
// If empty, the states are not persisted to file.
State string `json:"state"`
// Amount of time to retain states/metrics for.
// Once elapsed, old states/metrics are purged/compacted.
RetentionPeriod metav1.Duration `json:"retention_period"`
// Interval at which to compact the state database.
CompactPeriod metav1.Duration `json:"compact_period"`
// Set true to enable profiler.
Pprof bool `json:"pprof"`
// Set false to disable auto update
EnableAutoUpdate bool `json:"enable_auto_update"`
// Exit code to exit with when auto updating.
// Only valid when the auto update is enabled.
// Set -1 to disable the auto update by exit code.
AutoUpdateExitCode int `json:"auto_update_exit_code"`
// VersionFile is the file that contains the target version.
// If empty, the version file is not used.
VersionFile string `json:"version_file"`
// A list of nvidia tool command paths to overwrite the default paths.
NvidiaToolOverwrites pkgconfigcommon.ToolOverwrites `json:"nvidia_tool_overwrites"`
// PluginSpecsFile is the file that contains the plugin specs.
PluginSpecsFile string `json:"plugin_specs_file"`
// Components specifies the components to enable.
// Leave empty, "*", or "all" to enable all components.
// Or prefix component names with "-" to disable them.
Components []string `json:"components"`
// FailureInjector is the failure injector.
FailureInjector *components.FailureInjector `json:"failure_injector,omitempty"`
// contains filtered or unexported fields
}
Config provides gpud configuration data for the server
func (*Config) ShouldDisable ¶ added in v0.5.0
ShouldDisable returns true if the component should be disabled. If the disable component sets are not specified, it will return false, meaning it should not be disabled, instead enabled by default.
func (*Config) ShouldEnable ¶ added in v0.5.0
ShouldEnable returns true if the component should be enabled. If the enable component sets are not specified, it will return true, meaning it should be enabled by default.
type Op ¶
type Op struct {
pkgconfigcommon.ToolOverwrites
FailureInjector *components.FailureInjector
}
type OpOption ¶
type OpOption func(*Op)
func WithFailureInjector ¶ added in v0.6.0
func WithFailureInjector(injector *components.FailureInjector) OpOption
func WithInfinibandClassRootDir ¶ added in v0.5.1
Specifies the root directory of the InfiniBand class.
Click to show internal directories.
Click to hide internal directories.