{"modulePath":"github.com/threefoldtech/zos_base","version":"v1.1.5","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package kernel\n\n## Constants\n\n```go\nconst (\n\t// Debug means zos is running in debug mode\n\t// applications can handle this flag differently\n\tDebug = \"zos-debug\"\n\t// VirtualMachine forces zos to think it's running\n\t// on a virtual machine. used mainly for development\n\tVirtualMachine = \"zos-debug-vm\"\n\t// if disable-gpu flag is provided gpu feature will be disabled on that node\n\tDisableGPU = \"disable-gpu\"\n\n\t// This allows the node to work without ssd disk. If ssd disk is available\n\t// it will still be preferred for workloads. Otherwise fall back on HDD\n\tMissingSSD = \"missing-ssd\"\n\n\t// Light means zos is running in light mode\n\tLight = \"light\"\n)\n```\n\n## Types\n\n```go\ntype Params map[string][]string\n```\nParams represent the parameters passed to the kernel at boot\n\n```go\nfunc GetParams() Params\n```\nGetParams Get kernel cmdline arguments\n\n```go\nfunc (k Params) Exists(key string) bool\n```\nExists checks if a key is present in the kernel parameters\n\n```go\nfunc (k Params) Get(key string) ([]string, bool)\n```\nGet returns the values link to a key and a boolean boolean if true when the key exists in the params or false otherwise a nil list, and a true will be returned if the \\`key\\` is set in kernel params, but with no associated value\n\n```go\nfunc (k Params) GetOne(key string) (string, bool)\n```\nGetOne gets a single value for given key. If key is provided multiple times in the cmdline, the last one is used. If key does not exist, or has no associated value, a false is returned\n\n```go\nfunc (k Params) GetVersion() string\n```\ngetVersion checks if node is running version 4\n\n```go\nfunc (k Params) IsDebug() bool\n```\nIsDebug checks if zos-debug is set\n\n```go\nfunc (k Params) IsGPUDisabled() bool\n```\nGPUDisabled checks if gpu is diabled\n\n```go\nfunc (k Params) IsLight() bool\n```\nIsLight check if node is running in light mode\n\n```go\nfunc (k Params) IsV3() bool\n```\nIsV3 checks if node is running normal version 3\n\n```go\nfunc (k Params) IsV3Light() bool\n```\nISV3Light check if node is running in v3light mode\n\n```go\nfunc (k Params) IsV4() bool\n```\nIsV4 checks if node is running version 4\n\n```go\nfunc (k Params) IsVirtualMachine() bool\n```\nIsVirtualMachine checks if zos-debug-vm is set\n\n","path":"github.com/threefoldtech/zos_base/pkg/kernel","name":"kernel","synopsis":"","isRedistributable":true}
