buildah

package
v0.0.0-...-184e638 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2023 License: MPL-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPlugin

func NewPlugin(logger hclog.Logger) drivers.DriverPlugin

NewPlugin returns a new buildah driver plugin

Types

type Config

type Config struct{}

Config contains configuration information for the plugin. Buildah contains no host level configuration items, so this is empty.

type Plugin

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

Plugin provides the container for the entire plugin, as well as its attached resources.

func (*Plugin) Capabilities

func (p *Plugin) Capabilities() (*drivers.Capabilities, error)

Capabilities returns the features supported by the driver.

func (*Plugin) ConfigSchema

func (p *Plugin) ConfigSchema() (*hclspec.Spec, error)

ConfigSchema returns the plugin configuration schema.

func (*Plugin) DestroyTask

func (p *Plugin) DestroyTask(taskID string, force bool) error

DestroyTask cleans up and removes a task that has terminated.

func (*Plugin) ExecTask

func (p *Plugin) ExecTask(taskID string, cmd []string, timeout time.Duration) (*drivers.ExecTaskResult, error)

ExecTask is an unused capability not supported by buildah.

func (*Plugin) Fingerprint

func (p *Plugin) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error)

Fingerprint returns a channel that will be used to send health information and other driver specific node attributes.

func (*Plugin) InspectTask

func (p *Plugin) InspectTask(taskID string) (*drivers.TaskStatus, error)

InspectTask returns detailed status information for the referenced taskID.

func (*Plugin) PluginInfo

func (p *Plugin) PluginInfo() (*base.PluginInfoResponse, error)

PluginInfo returns information describing the plugin.

func (*Plugin) RecoverTask

func (p *Plugin) RecoverTask(handle *drivers.TaskHandle) error

RecoverTask recreates the in-memory state of a task from a TaskHandle. Since the build task runs in the same process space as this driver, it is impossible for this driver to crash and the task to then be recoverable. So this function just returns an error in all cases.

func (*Plugin) SetConfig

func (p *Plugin) SetConfig(cfg *base.Config) error

SetConfig is called by the client to pass the configuration for the plugin.

func (*Plugin) SignalTask

func (p *Plugin) SignalTask(taskID string, signal string) error

SignalTask is an unused capability not supported by buildah.

func (*Plugin) StartTask

StartTask returns a task handle and a driver network if necessary.

func (*Plugin) StopTask

func (p *Plugin) StopTask(taskID string, timeout time.Duration, signal string) error

StopTask stops a running task with the given signal and within the timeout window.

func (*Plugin) TaskConfigSchema

func (p *Plugin) TaskConfigSchema() (*hclspec.Spec, error)

TaskConfigSchema returns the HCL schema for the configuration of a task.

func (*Plugin) TaskEvents

func (p *Plugin) TaskEvents(ctx context.Context) (<-chan *drivers.TaskEvent, error)

TaskEvents returns a channel that the plugin can use to emit task related events.

func (*Plugin) TaskStats

func (p *Plugin) TaskStats(ctx context.Context, taskID string, interval time.Duration) (<-chan *drivers.TaskResourceUsage, error)

TaskStats returns a channel which the driver should send stats to at the given interval.

func (*Plugin) WaitTask

func (p *Plugin) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error)

WaitTask returns a channel used to notify Nomad when a task exits.

type TaskConfig

type TaskConfig struct {
	// Containerfile should point to the file already on-disk that buildah can decode.
	Containerfile string `codec:"containerfile"`
}

TaskConfig contains configuration information for a task that runs with this plugin

type TaskState

type TaskState struct {
	ReattachConfig *structs.ReattachConfig
	TaskConfig     *drivers.TaskConfig
	StartedAt      time.Time
}

TaskState is the runtime state which is encoded in the handle returned to Nomad client. This information is needed to rebuild the task state and handler during recovery.

Jump to

Keyboard shortcuts

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