runner

package
v0.1.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2022 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cmd

type Cmd string

Cmd ...

type Ctx

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

Ctx ...

func (*Ctx) Cmd

func (c *Ctx) Cmd() Cmd

Cmd ...

func (*Ctx) Context

func (c *Ctx) Context() context.Context

Context ...

func (*Ctx) Env

func (c *Ctx) Env() []string

Env ...

func (*Ctx) Next

func (c *Ctx) Next() error

Next ...

func (*Ctx) Reset

func (c *Ctx) Reset()

Reset ...

func (*Ctx) Runner

func (c *Ctx) Runner() *Runner

Runner ...

func (*Ctx) Task

func (c *Ctx) Task() spec.Task

Task ...

func (*Ctx) WorkingDir

func (c *Ctx) WorkingDir() WorkingDir

WorkingDir ..

type Env

type Env map[string]string

Env ...

type Opt

type Opt func(*Opts)

Opt ...

func WithEnv

func WithEnv(env Env) Opt

WithEnv ...

func WithSpec

func WithSpec(file *spec.Spec) Opt

WithSpec ...

func WithVars

func WithVars(vars Vars) Opt

WithVars ...

func WithWorkingDir

func WithWorkingDir(cwd string) Opt

WithWorkingDir ...

type Opts

type Opts struct {
	Stdin      io.Reader
	Stdout     io.Writer
	Stderr     io.Writer
	Timeout    time.Duration
	File       *spec.Spec
	Vars       Vars
	Env        Env
	WorkingDir spec.WorkingDir
}

Opts ...

func (*Opts) Configure

func (o *Opts) Configure(opts ...Opt)

Configure ...

type ReleaseFunc

type ReleaseFunc func()

ReleaseFunc ...

type RunFunc

type RunFunc func(c *Ctx) error

RunFunc ...

type Runner

type Runner struct {
	sync.Mutex
	// contains filtered or unexported fields
}

Runner ...

func WithContext

func WithContext(ctx context.Context, opts ...Opt) *Runner

WithContext ...

func (*Runner) AcquireCtx

func (r *Runner) AcquireCtx() *Ctx

AcquireCtx ...

func (*Runner) Context

func (r *Runner) Context() context.Context

Context ...

func (*Runner) ReleaseCtx

func (r *Runner) ReleaseCtx(c *Ctx) ReleaseFunc

ReleseCtx ...

func (*Runner) RunTasks

func (r *Runner) RunTasks(tasks ...string) error

RunTask ...

func (*Runner) Stderr

func (r *Runner) Stderr() io.Writer

Stderr ...

func (*Runner) Stdin

func (r *Runner) Stdin() io.Reader

Stdin ...

func (*Runner) Stdout

func (r *Runner) Stdout() io.Writer

Stdout ...

func (*Runner) Use

func (r *Runner) Use(funcs ...RunFunc)

Use ...

type Vars

type Vars map[string]string

Vars ...

type WorkingDir

type WorkingDir string

WorkingDir ..

Jump to

Keyboard shortcuts

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