Remove unused constants and variables

Signed-off-by: Evan Lezar <elezar@nvidia.com>
This commit is contained in:
Evan Lezar 2023-06-11 11:38:22 +02:00
parent 178eb5c5a8
commit 2bc0f45a52
2 changed files with 1 additions and 18 deletions

View File

@ -31,11 +31,6 @@ import (
) )
const ( const (
nvidiaRuntimeName = "nvidia"
nvidiaRuntimeBinary = "nvidia-container-runtime"
nvidiaExperimentalRuntimeName = "nvidia-experimental"
nvidiaExperimentalRuntimeBinary = "nvidia-container-runtime.experimental"
defaultConfig = "/etc/containerd/config.toml" defaultConfig = "/etc/containerd/config.toml"
defaultSocket = "/run/containerd/containerd.sock" defaultSocket = "/run/containerd/containerd.sock"
defaultRuntimeClass = "nvidia" defaultRuntimeClass = "nvidia"
@ -50,12 +45,6 @@ const (
socketMessageToGetPID = "" socketMessageToGetPID = ""
) )
// nvidiaRuntimeBinaries defines a map of runtime names to binary names
var nvidiaRuntimeBinaries = map[string]string{
nvidiaRuntimeName: nvidiaRuntimeBinary,
nvidiaExperimentalRuntimeName: nvidiaExperimentalRuntimeBinary,
}
// options stores the configuration from the command line or environment variables // options stores the configuration from the command line or environment variables
type options struct { type options struct {
container.Options container.Options

View File

@ -31,23 +31,17 @@ import (
) )
const ( const (
nvidiaRuntimeName = "nvidia"
nvidiaRuntimeBinary = "nvidia-container-runtime"
nvidiaExperimentalRuntimeName = "nvidia-experimental"
nvidiaExperimentalRuntimeBinary = "nvidia-container-runtime.experimental"
defaultConfig = "/etc/docker/daemon.json" defaultConfig = "/etc/docker/daemon.json"
defaultSocket = "/var/run/docker.sock" defaultSocket = "/var/run/docker.sock"
defaultSetAsDefault = true defaultSetAsDefault = true
// defaultRuntimeName specifies the NVIDIA runtime to be use as the default runtime if setting the default runtime is enabled // defaultRuntimeName specifies the NVIDIA runtime to be use as the default runtime if setting the default runtime is enabled
defaultRuntimeName = nvidiaRuntimeName defaultRuntimeName = "nvidia"
defaultRestartMode = "signal" defaultRestartMode = "signal"
defaultHostRootMount = "/host" defaultHostRootMount = "/host"
reloadBackoff = 5 * time.Second reloadBackoff = 5 * time.Second
maxReloadAttempts = 6 maxReloadAttempts = 6
defaultDockerRuntime = "runc"
socketMessageToGetPID = "GET /info HTTP/1.0\r\n\r\n" socketMessageToGetPID = "GET /info HTTP/1.0\r\n\r\n"
) )