apple

package
v1.0.64 Latest Latest
Warning

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

Go to latest
Published: Jul 13, 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, logDir string) *Provider

NewProvider creates a new Provider with the given container binary path and log directory. If containerPath is empty, it defaults to "container". The logDir parameter specifies where job logs are stored.

func (*Provider) DeleteJobLog

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

DeleteJobLog removes the log file for the specified job.

func (*Provider) GetAllJobIDs

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

GetAllJobIDs returns IDs of all jobs with log files. Log files are stored in the configured logDir.

func (*Provider) GetRunningJobIDs

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 p42runtime.JobOptions) error

RunJob runs a job with the specified options. If p.logDir is set, logs are written to {logDir}/{JobID}.

func (*Provider) ValidateJobID

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