crun

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2020 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Name        = "crun"
	DisplayName = "crun"
	Version     = "unknown"
	CommitHash  = "unknown"
)
View Source
var DefaultMutexdir = "/tmp/crun"
View Source
var ErrTimeout = errors.New("timeout")

Functions

func LookupGroup added in v0.3.0

func LookupGroup(id string) (int, error)

func LookupUserStruct added in v0.3.0

func LookupUserStruct(id string) (*user.User, error)

Types

type Config added in v0.3.0

type Config struct {
	PreHandlers        []string          `toml:"pre"`
	NoticeHandlers     []string          `toml:"notice"`
	PostHandlers       []string          `toml:"post"`
	SuccessHandlers    []string          `toml:"success"`
	FailureHandlers    []string          `toml:"failure"`
	LogFile            string            `toml:"log_file"`
	LogPrefix          string            `toml:"log_prefix"`
	Tag                string            `toml:"tag"`
	Quiet              bool              `toml:"quiet"`
	WorkingDirectory   string            `toml:"working_directory"`
	Mutexdir           string            `toml:"mutexdir"`
	Mutex              string            `toml:"mutex"`
	Environment        []string          `toml:"environment"`
	EnvironmentMap     map[string]string `toml:"-"`
	WithoutOverlapping bool              `toml:"without_overlapping"`
	User               string            `toml:"user"`
	Group              string            `toml:"group"`
	Timeout            int64             `toml:"timeout"`
}

func (*Config) LoadConfigFile added in v0.3.0

func (c *Config) LoadConfigFile(path string) error

func (*Config) Prepare added in v0.3.0

func (c *Config) Prepare() error

type Crun added in v0.3.0

type Crun struct {
	Config       *Config
	Report       *structs.Report
	CommandArgs  []string
	StdoutWriter io.Writer
	StderrWriter io.Writer
	// contains filtered or unexported fields
}

func New added in v0.3.0

func New() *Crun

func (*Crun) Close added in v0.3.0

func (c *Crun) Close()

func (*Crun) Command added in v0.3.0

func (c *Crun) Command() string

func (*Crun) Run added in v0.3.0

func (c *Crun) Run() (*structs.Report, error)

type LuaApp added in v0.3.0

type LuaApp struct {
	LState *lua.LState
}

func NewLuaApp added in v0.3.0

func NewLuaApp() *LuaApp

func (*LuaApp) Run added in v0.3.0

func (lapp *LuaApp) Run(args []string) error

Jump to

Keyboard shortcuts

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