Files
wehub-resource-sync 36b3af2e3d
PR Check / Code Quality: Format (push) Failing after 1s
PR Check / Code Quality: Lint (darwin) (push) Failing after 0s
PR Check / Code Quality: Lint (freebsd) (push) Failing after 1s
PR Check / Code Quality: Lint (windows) (push) Failing after 1s
PR Check / Code Quality: Lint (linux) (push) Failing after 1s
PR Check / Security: Vulnerability Scan (push) Failing after 0s
Update Documentation / update-docs (push) Failing after 2s
PR Check / Code Quality: Vendor (push) Failing after 1s
PR Check / Code Quality: Coverage (push) Failing after 0s
PR Check / Tests: Unit (macos-latest) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04) (push) Has been cancelled
PR Check / Tests: Unit (ubuntu-24.04-arm) (push) Has been cancelled
PR Check / Tests: Unit (windows-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:22:06 +08:00

19 lines
862 B
Go

package proc
import "github.com/pranshuparmar/witr/pkg/model"
func init() { registerRuntime(lxdRuntime{}) }
type lxdRuntime struct{}
func (lxdRuntime) Name() string { return "lxd" }
// LXD's client binary is `lxc`, which collides with classic LXC's CLI prefix.
// We require both `lxc` and the `lxd` daemon binary to be present so we don't
// accidentally call into classic LXC's tooling (which doesn't take a `list`
// subcommand) on a system that has lxc-* installed but no LXD.
func (lxdRuntime) Available() bool { return binAvailable("lxc") && binAvailable("lxd") }
func (lxdRuntime) List() []*model.ContainerMatch { return lxdLikeList("lxc", "lxd") }
func (lxdRuntime) HostPID(id string) int { return lxdLikeHostPID("lxc", id) }
func (lxdRuntime) Enrich(match *model.ContainerMatch) { lxdLikeEnrich("lxc", match) }