mounts

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package mounts implements the mounts apply step: activation of systemd mount units whose unit files are already placed by mise. This step never writes unit files — placement is mise's job; it only runs mkdir for the destinations and systemctl for activation.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ExecRunner

type ExecRunner struct{}

ExecRunner runs commands via exec.CommandContext.

func (ExecRunner) Run

func (ExecRunner) Run(ctx context.Context, argv []string) error

Run executes argv[0] with argv[1:], returning the combined output on failure so callers can log systemctl's own diagnostics (e.g. "not loaded").

type Runner

type Runner interface {
	Run(ctx context.Context, argv []string) error
}

Runner executes one privileged command argv.

type Step

type Step struct {
	Runner Runner
	Plan   resolve.MountsStep
}

Step activates the mount units of a resolved plan: it creates every destination directory, reloads systemd once so it picks up the unit files mise placed, then enables (or disables) each mount unit — plus its timer unit when the entry declares StartAt.

func (*Step) Name

func (s *Step) Name() string

Name returns the pipeline step name.

func (*Step) Run

func (s *Step) Run(ctx context.Context) error

Run executes the mounts step. An empty plan is a no-op success.

Jump to

Keyboard shortcuts

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