Skip to content

Commit

Permalink
vm-runner: move comments for config fields to the struct definition
Browse files Browse the repository at this point in the history
Signed-off-by: Misha Sakhnov <[email protected]>
  • Loading branch information
mikhail-sakhnov committed Oct 22, 2024
1 parent 853186d commit a28be0f
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions neonvm-runner/cmd/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,10 +617,14 @@ type Config struct {
appendKernelCmdline string
skipCgroupManagement bool
diskCacheSettings string
memoryProvider vmv1.MemoryProvider
autoMovableRatio string
cpuScalingMode string
architecture string
// memoryProvider is a memory provider to use. Validated in newConfig.
memoryProvider vmv1.MemoryProvider
// autoMovableRatio value for VirtioMem provider. Validated in newConfig.
autoMovableRatio string
// cpuScalingMode is a mode to use for CPU scaling. Validated in newConfig.
cpuScalingMode string
// System CPU architecture. Set automatically equal to runtime.GOARCH.
architecture string
}

func newConfig(logger *zap.Logger) *Config {
Expand All @@ -631,10 +635,10 @@ func newConfig(logger *zap.Logger) *Config {
appendKernelCmdline: "",
skipCgroupManagement: false,
diskCacheSettings: "cache=none",
memoryProvider: "", // Require that this is explicitly set. We'll check later.
autoMovableRatio: "", // Require that this is explicitly set IFF memoryProvider is VirtioMem. We'll check later.
cpuScalingMode: "", // Require that this is explicitly set. We'll check later.
architecture: runtime.GOARCH, // arm64, amd64
memoryProvider: "",
autoMovableRatio: "",
cpuScalingMode: "",
architecture: runtime.GOARCH,
}
flag.StringVar(&cfg.vmSpecDump, "vmspec", cfg.vmSpecDump,
"Base64 encoded VirtualMachine json specification")
Expand Down

0 comments on commit a28be0f

Please sign in to comment.