Documentation ¶
Index ¶
- func NewPlugin(logger hclog.Logger) drivers.DriverPlugin
- type Config
- type Plugin
- func (p *Plugin) Capabilities() (*drivers.Capabilities, error)
- func (p *Plugin) ConfigSchema() (*hclspec.Spec, error)
- func (p *Plugin) DestroyTask(taskID string, force bool) error
- func (p *Plugin) ExecTask(taskID string, cmd []string, timeout time.Duration) (*drivers.ExecTaskResult, error)
- func (p *Plugin) Fingerprint(ctx context.Context) (<-chan *drivers.Fingerprint, error)
- func (p *Plugin) InspectTask(taskID string) (*drivers.TaskStatus, error)
- func (p *Plugin) PluginInfo() (*base.PluginInfoResponse, error)
- func (p *Plugin) RecoverTask(handle *drivers.TaskHandle) error
- func (p *Plugin) SetConfig(cfg *base.Config) error
- func (p *Plugin) SignalTask(taskID string, signal string) error
- func (p *Plugin) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drivers.DriverNetwork, error)
- func (p *Plugin) StopTask(taskID string, timeout time.Duration, signal string) error
- func (p *Plugin) TaskConfigSchema() (*hclspec.Spec, error)
- func (p *Plugin) TaskEvents(ctx context.Context) (<-chan *drivers.TaskEvent, error)
- func (p *Plugin) TaskStats(ctx context.Context, taskID string, interval time.Duration) (<-chan *drivers.TaskResourceUsage, error)
- func (p *Plugin) WaitTask(ctx context.Context, taskID string) (<-chan *drivers.ExitResult, error)
- type TaskConfig
- type TaskState
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 ¶
ConfigSchema returns the plugin configuration schema.
func (*Plugin) DestroyTask ¶
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 ¶
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 ¶
SetConfig is called by the client to pass the configuration for the plugin.
func (*Plugin) SignalTask ¶
SignalTask is an unused capability not supported by buildah.
func (*Plugin) StartTask ¶
func (p *Plugin) StartTask(cfg *drivers.TaskConfig) (*drivers.TaskHandle, *drivers.DriverNetwork, error)
StartTask returns a task handle and a driver network if necessary.
func (*Plugin) StopTask ¶
StopTask stops a running task with the given signal and within the timeout window.
func (*Plugin) TaskConfigSchema ¶
TaskConfigSchema returns the HCL schema for the configuration of a task.
func (*Plugin) TaskEvents ¶
TaskEvents returns a channel that the plugin can use to emit task related events.
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.