Documentation
¶
Index ¶
- func GenerateNetworkConfig(vm *models.MicroVM) (string, error)
- func PIDReadFromFile(pidFile string, fs afero.Fs) (int, error)
- func PIDWriteToFile(pid int, pidFile string, fs afero.Fs) error
- func RemoveStaleSockets(fs afero.Fs, paths ...string) error
- func ResolveImageFile(root, filename string) (string, error)
- func ResolveSocketPath(fs afero.Fs, path, legacyPath string) string
- type MachineMetrics
- type Metrics
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateNetworkConfig ¶
GenerateNetworkConfig will generate the cloud-init network config from the vm spec.
func RemoveStaleSockets ¶ added in v0.15.2
RemoveStaleSockets removes any of the given socket files that exist, so a VMM can bind to them on (re)create.
func ResolveImageFile ¶ added in v0.15.2
ResolveImageFile returns the host path of filename within the image mounted at root, which must be an absolute path. Symlinks are followed as if root were the filesystem root, so the result never escapes the mount. The result must be a regular file.
func ResolveSocketPath ¶ added in v0.15.2
ResolveSocketPath returns the socket path for a process that is already running. That's path, unless only legacyPath exists, which means the process was started before sockets moved out of the state directory. Legacy fallback for #1226, to be removed in the next minor release.
Types ¶
type MachineMetrics ¶
type MachineMetrics struct {
Namespace string `json:"Namespace"`
MachineName string `json:"MachineName"`
MachineUID string `json:"MachineUID"`
Data Metrics `json:"Data"`
}
func (MachineMetrics) ToPrometheus ¶
func (mm MachineMetrics) ToPrometheus() []byte