initd

package
v0.0.0-...-40488cf Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 12, 2026 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Overview

Package initd contains the runnable entry point for the vminitd guest process. External cmd wrappers parse flags via ParseFlags and call Run to start the service. Plugins are registered via blank imports in the cmd wrapper.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context) error

Run starts vminitd: performs system init (mounts, cgroups, networking), builds the ttrpc service from registered plugins, and runs until a fatal error or shutdown signal. Plugin _ imports must be wired in by the caller.

Types

type Config

type Config struct {
	VSockContextID int
	RPCPort        int
	StreamPort     int
	Networks       Networks
	DumpInfo       bool
	Debug          bool
	Dev            bool
}

Config holds the parsed vminitd configuration.

func ParseFlags

func ParseFlags(args []string) Config

ParseFlags parses the standard vminitd command-line flags from args and returns the populated Config. The "tsi_hijack" leading argument injected by libkrun (when TSI is enabled) is stripped before parsing.

type Networks

type Networks []vmnetworking.Network

Networks is a flag.Value implementation for repeated -network arguments, parsing each value into a vmnetworking.Network and appending to the slice.

func (*Networks) Set

func (n *Networks) Set(value string) error

func (*Networks) String

func (n *Networks) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL