compiler

package
v0.0.0-...-b94449b Latest Latest
Warning

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

Go to latest
Published: Sep 17, 2021 License: AGPL-3.0 Imports: 28 Imported by: 0

Documentation

Overview

Package compiler contains code to compile manifests into executable plans.

Only POSIX shell and bash are currently supported.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppendPlan

func AppendPlan(ctx context.Context, planFile string, info operator.Info, cobraCmd *cobra.Command, args []string) error

func GetOperation

func GetOperation(op operator.Interface) (operator.Interface, error)

GetOperation returns the original implementation of an operator's interface.

func Operators

func Operators() []operator.Interface

Operators returns a list of all available operators.

Types

type Compiler

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

func New

func New() *Compiler

func (*Compiler) Compile

func (c *Compiler) Compile(ctx context.Context, m *manifest.Manifest) (*Plan, error)

type Plan

type Plan struct {
	Name         string               `json:"name"`
	Operations   []operator.Interface `json:"operations"`
	Plans        []*Plan              `json:"plans,omitempty"`
	Dependencies []*Plan              `json:"dependencies,omitempty"`
}

func (Plan) All

func (p Plan) All() ([]*Plan, error)

func (Plan) RealOps

func (p Plan) RealOps() []operator.Interface

func (Plan) TextSummary

func (p Plan) TextSummary(w io.Writer, prevs, currs []state.State) error

Directories

Path Synopsis
Package shell handles parsing shell scripts in plan files.
Package shell handles parsing shell scripts in plan files.

Jump to

Keyboard shortcuts

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