apple

package
v1.0.39 Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2026 License: BSD-2-Clause Imports: 13 Imported by: 0

Documentation

Overview

Package apple implements the RuntimeProvider interface for Apple's container runtime.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	// contains filtered or unexported fields
}

Provider implements RuntimeProvider for Apple's container runtime.

func NewProvider

func NewProvider(containerPath string) *Provider

NewProvider creates a new Provider with the given container binary path. If containerPath is empty, it defaults to "container".

func (*Provider) DeleteJobLog added in v1.0.39

func (p *Provider) DeleteJobLog(jobID string) error

DeleteJobLog removes the log file for the specified job. Log files are stored in ~/Library/Logs/ai.plan42.runner/.

func (*Provider) GetCompletedJobIDs added in v1.0.39

func (p *Provider) GetCompletedJobIDs() ([]string, error)

GetCompletedJobIDs returns IDs of all completed jobs with log files. Log files are stored in ~/Library/Logs/ai.plan42.runner/.

func (*Provider) GetRunningJobIDs added in v1.0.39

func (p *Provider) GetRunningJobIDs(ctx context.Context) ([]string, error)

GetRunningJobIDs returns IDs of all running containers matching the plan42-* pattern.

func (*Provider) IsInstalled

func (p *Provider) IsInstalled() bool

IsInstalled reports whether the container binary is available on the system.

func (*Provider) KillJob

func (p *Provider) KillJob(ctx context.Context, jobID string) error

KillJob terminates the job with the given ID. This streams output directly to os.Stdout/os.Stderr and panics on exit error, matching the original behavior in container.go.

func (*Provider) Name

func (p *Provider) Name() string

Name returns the configuration name of the runtime.

func (*Provider) PullImage

func (p *Provider) PullImage(ctx context.Context, image string) error

PullImage pulls the specified container image.

func (*Provider) RunJob

func (p *Provider) RunJob(ctx context.Context, opts runtime.JobOptions) error

RunJob runs a job with the specified options. The provider computes the log file path internally based on JobID, storing logs in ~/Library/Logs/ai.plan42.runner/{JobID}.

func (*Provider) ValidateJobID added in v1.0.39

func (p *Provider) ValidateJobID(jobID string) error

ValidateJobID checks if the given job ID is valid for this runtime. A valid job ID has the format "plan42-{taskID}-{turnIndex}".

Jump to

Keyboard shortcuts

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