runtime

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2019 License: Apache-2.0 Imports: 3 Imported by: 1

Documentation

Overview

Package runtime provides the ability for Vela to integrate with different supported Runtime environments.

Usage:

import "github.com/go-vela/worker/runtime"

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToContext

func ToContext(c Setter, r Engine)

ToContext adds the runtime Engine to this context if it supports the Setter interface.

Types

type Engine

type Engine interface {

	// InfoContainer defines a function that gets
	// information on the pipeline container.
	InfoContainer(context.Context, *pipeline.Container) error
	// RemoveContainer defines a function that deletes
	// (kill, remove) the pipeline container.
	RemoveContainer(context.Context, *pipeline.Container) error
	// RunContainer defines a function that creates
	// and start the pipeline container.
	RunContainer(context.Context, *pipeline.Build, *pipeline.Container) error
	// SetupContainer defines a function that pulls
	// the image for the pipeline container.
	SetupContainer(context.Context, *pipeline.Container) error
	// TailContainer defines a function that captures
	// the logs on the pipeline container.
	TailContainer(context.Context, *pipeline.Container) (io.ReadCloser, error)
	// WaitContainer defines a function that blocks
	// until the pipeline container completes.
	WaitContainer(context.Context, *pipeline.Container) error

	// CreateNetwork defines a function that
	// creates the pipeline network.
	CreateNetwork(context.Context, *pipeline.Build) error
	// RemoveNetwork defines a function that
	// deletes the pipeline network.
	RemoveNetwork(context.Context, *pipeline.Build) error

	// CreateVolume defines a function that
	// creates the pipeline volume.
	CreateVolume(context.Context, *pipeline.Build) error
	// RemoveVolume defines a function that
	// deletes the pipeline volume.
	RemoveVolume(context.Context, *pipeline.Build) error
}

Engine represents the interface for Vela integrating with the different supported Runtime environments.

func FromContext

func FromContext(c context.Context) Engine

FromContext returns the runtime Engine associated with this context.

type Setter

type Setter interface {
	Set(string, interface{})
}

Setter defines a context that enables setting values.

Directories

Path Synopsis
Package docker provides the ability for Vela to integrate with Docker as a runtime environment.
Package docker provides the ability for Vela to integrate with Docker as a runtime environment.

Jump to

Keyboard shortcuts

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