Documentation ¶
Overview ¶
Package util groups a bunch of common helper functions used by commands.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrorLogger io.Writer
ErrorLogger is where error messages should be written to. These messages are consumed by containerd and show up to users of command line tools, like docker/kubectl.
Functions ¶
func Errorf ¶
func Errorf(format string, args ...any) subcommands.ExitStatus
Errorf logs error to containerd log (--log), to stderr, and debug logs. It returns subcommands.ExitFailure for convenience with subcommand.Execute() methods:
return Errorf("Danger! Danger!")
func IsPCIDeviceDirTPU ¶
IsPCIDeviceDirTPU returns if the given PCI device sysfs path is a TPU device with one of the allowed device IDs.
func IsTPUDeviceValid ¶
IsTPUDeviceValid returns if the accelerator device is valid.
Types ¶
Click to show internal directories.
Click to hide internal directories.