Documentation
¶
Overview ¶
Package apple implements the RuntimeProvider interface for Apple's container runtime.
Index ¶
- type Provider
- func (p *Provider) DeleteJobLog(jobID string) error
- func (p *Provider) GetAllJobIDs(ctx context.Context) ([]string, error)
- func (p *Provider) GetRunningJobIDs(ctx context.Context) ([]string, error)
- func (p *Provider) IsInstalled() bool
- func (p *Provider) KillJob(ctx context.Context, jobID string) error
- func (p *Provider) Name() string
- func (p *Provider) PullImage(ctx context.Context, image string) error
- func (p *Provider) RunJob(ctx context.Context, opts p42runtime.JobOptions) error
- func (p *Provider) ValidateJobID(jobID string) error
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 ¶
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 ¶
DeleteJobLog removes the log file for the specified job.
func (*Provider) GetAllJobIDs ¶
GetAllJobIDs returns IDs of all jobs with log files. Log files are stored in the configured logDir.
func (*Provider) GetRunningJobIDs ¶
GetRunningJobIDs returns IDs of all running containers matching the plan42-* pattern.
func (*Provider) IsInstalled ¶
IsInstalled reports whether the container binary is available on the system.
func (*Provider) KillJob ¶
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) 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 ¶
ValidateJobID checks if the given job ID is valid for this runtime. A valid job ID has the format "plan42-{taskID}-{turnIndex}".