executor

package
v0.0.53 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2022 License: BSD-3-Clause Imports: 16 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CleanUp added in v0.0.44

func CleanUp()

CleanUp close file you use.

Types

type Binary

type Binary struct {
	Args []string
	// from SD API
	Spec  *util.CommandSpec
	Store store.Store
	// Note: this property is set after downloaing a binary via Store API
	Command *store.Command
}

Binary is a Binary Executor object

func NewBinary

func NewBinary(spec *util.CommandSpec, arg []string, isVerbose bool) (*Binary, error)

NewBinary returns Binary object

func (*Binary) Run

func (b *Binary) Run() error

Run executes command and returns output

type Executor

type Executor interface {
	Run() error
}

Executor is a Executor endpoint

func New

func New(sdAPI api.API, args []string) (Executor, error)

New returns each format type of Executor

type Habitat added in v0.0.14

type Habitat struct {
	Args  []string
	Spec  *util.CommandSpec
	Store store.Store
}

Habitat is the Habitat Executor struct

func NewHabitat added in v0.0.14

func NewHabitat(spec *util.CommandSpec, args []string, isVerbose bool) (habitat *Habitat, err error)

NewHabitat returns the Habitat struct

func (*Habitat) Run added in v0.0.14

func (h *Habitat) Run() (err error)

Run executes "hab install" and "hab exec"

Jump to

Keyboard shortcuts

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