toolshare

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Nov 24, 2026 License: BSD-3-Clause Imports: 13 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	Root string
	// contains filtered or unexported fields
}

Manager owns the per-image unpack lifecycle. One per loom-server. Concurrent Ensure for the same ref is deduped via a per-image WG.

func New

func New(root string) *Manager

New returns a Manager backed by root (auto-created on first Ensure). root == "" defaults to ~/.weft-loom/tools/.

func (*Manager) Ensure

func (m *Manager) Ensure(ctx context.Context, logicalName, ref string) error

Ensure makes sure the image is pulled + unpacked. logicalName is the stable identifier the guest's tool wrappers reference (e.g. "texlive") ; ref is the OCI ref to pull. Idempotent : a second Ensure for the same ref is a no-op, a different ref under the same logicalName atomically flips the .current symlink.

func (*Manager) ToolsPath

func (m *Manager) ToolsPath() string

ToolsPath returns the host path the guest's virtio-9p mount_tag=tools should bind. Caller passes this to QEMU.

Jump to

Keyboard shortcuts

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