build

package
v0.0.0-...-470a87a Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Action

type Action interface {
	Resource() Resource
	Name() string
	Image() string
	Entrypoint() []string
	Cmd() []string
	Invoke(ctx context.Context, input interface{}, outputSchema *assets.Schema, output interface{}) error
}

type Request

type Request interface {
	Id() string
	Resources() map[string]Resource
	WorkspacePath() string
	Apply(ctx context.Context) error
}

Represents a context for a single build request. Extends 'context.Context' and provides additional information and tools such as a tagged logger and workspace path.

func New

func New(id string, workspacePath string, b []byte) (req Request, err error)

Creates a new build request context.

type Resource

type Resource interface {
	Request() Request
	Name() string
	Type() string
	Config() interface{}
	ConfigSchema() *assets.Schema
	WorkspacePath() string
	Init(ctx context.Context) error
	DiscoverState(ctx context.Context) error
	Apply(ctx context.Context) error
}

Represents a single resource in a build request.

Jump to

Keyboard shortcuts

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