core

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2016 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Exports = map[string]lua.LGFunction{
	"log":        defaultCore.LuaLog,
	"environ":    defaultCore.LuaEnviron,
	"exec":       defaultCore.LuaExecRaw,
	"start":      defaultCore.LuaStartRaw,
	"make_group": defaultCore.LuaMakeGroup,
	"wait":       defaultCore.LuaWait,
}

Exports contains the API for the lark.core lua module.

View Source
var Module = gluamodule.New("lark.core", Loader,
	doc.Module,
)

Module is a gluamodule.Module that loads the lark.core module.

Functions

func Loader

func Loader(l *lua.LState) int

Loader preloads the lark.core module so it may be required in lua scripts.

func Log

func Log(msg string, opt *LogOpt)

Log logs a message to standard error.

Types

type ExecRawOpt

type ExecRawOpt struct {
	Env []string
	Dir string

	Input        []byte
	StdinFile    string
	StdoutFile   string
	StdoutAppend bool
	StderrFile   string
	// StderrAppend is ignored if StderrFile equals StdoutFile.
	StderrAppend bool

	// TODO: Output capture. This will interact interestingly with command
	// result caching and file redirection.  It should be thought out more.
	StdoutCapture bool
	StderrCapture bool

	StdoutTee bool
	StderrTee bool
}

ExecRawOpt contains options for ExecRaw.

type ExecRawResult

type ExecRawResult struct {
	Err    error
	Output string
}

ExecRawResult is returned from ExecRaw

func ExecRaw

func ExecRaw(name string, args []string, opt *ExecRawOpt) *ExecRawResult

ExecRaw executes the named command with the given arguments.

type LogOpt

type LogOpt struct {
	Color string
}

LogOpt contains options for the Log function

Jump to

Keyboard shortcuts

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