interpreter

package
v0.0.0-...-ff7342e Latest Latest
Warning

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

Go to latest
Published: Sep 24, 2017 License: GPL-3.0, GPL-3.0-only Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AbsorbError

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

func (AbsorbError) Exec

func (ae AbsorbError) Exec(l log.Logger) error

func (AbsorbError) String

func (ae AbsorbError) String() string

type BaseConfigProvider

type BaseConfigProvider config.ConfigurationJSON

func (*BaseConfigProvider) Eval

type Command

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

func (*Command) Kill

func (cmd *Command) Kill() *CommandSignal

func (*Command) Signal

func (cmd *Command) Signal(sig os.Signal) *CommandSignal

func (*Command) Start

func (cmd *Command) Start() *CommandStart

func (*Command) Terminate

func (cmd *Command) Terminate() *CommandSignal

func (*Command) Wait

func (cmd *Command) Wait() *CommandWait

type CommandSignal

type CommandSignal struct {
	*Command
	// contains filtered or unexported fields
}

func (*CommandSignal) Exec

func (cmds *CommandSignal) Exec(l log.Logger) error

func (*CommandSignal) String

func (cmds *CommandSignal) String() string

type CommandStart

type CommandStart Command

func (*CommandStart) Exec

func (cmd *CommandStart) Exec(l log.Logger) error

func (*CommandStart) String

func (cmd *CommandStart) String() string

type CommandWait

type CommandWait Command

func (*CommandWait) Exec

func (cmdw *CommandWait) Exec(l log.Logger) error

func (*CommandWait) String

func (cmdw *CommandWait) String() string

type ConfigComparer

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

func (*ConfigComparer) Exec

func (cc *ConfigComparer) Exec(l log.Logger) error

func (*ConfigComparer) String

func (cc *ConfigComparer) String() string

type ConfigProvider

type ConfigProvider interface {
	Eval() (*config.ConfigurationJSON, error)
}

type ConfigWriter

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

func (*ConfigWriter) Exec

func (cw *ConfigWriter) Exec(l log.Logger) error

func (*ConfigWriter) String

func (cw *ConfigWriter) String() string

type Errors

type Errors []error

func (Errors) Error

func (e Errors) Error() string

type InParallel

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

func (*InParallel) Exec

func (ip *InParallel) Exec(l log.Logger) error

func (*InParallel) String

func (ip *InParallel) String() string

type Instruction

type Instruction interface {
	Exec(log.Logger) error
}

type InterpreterEnv

type InterpreterEnv struct {
	log.Logger
	// contains filtered or unexported fields
}

func NewInterpreterEnv

func NewInterpreterEnv() *InterpreterEnv

func (InterpreterEnv) MaybeExit

func (ie InterpreterEnv) MaybeExit(err error) error

func (InterpreterEnv) Run

func (ie InterpreterEnv) Run(setup *Setup, prog Instruction) error

type LazyPath

type LazyPath interface {
	Path() string
}

type LogMsg

type LogMsg string

func (LogMsg) Exec

func (s LogMsg) Exec(l log.Logger) error

func (LogMsg) String

func (s LogMsg) String() string

type MutableConfigProvider

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

func NewMutableConfigProvider

func NewMutableConfigProvider(c *config.ConfigurationJSON) *MutableConfigProvider

func (*MutableConfigProvider) AddHost

func (*MutableConfigProvider) ChangeF

func (*MutableConfigProvider) Clone

func (*MutableConfigProvider) Eval

func (*MutableConfigProvider) NewConfigComparer

func (mcp *MutableConfigProvider) NewConfigComparer(hosts ...string) *ConfigComparer

func (*MutableConfigProvider) Ports

func (mcp *MutableConfigProvider) Ports() ([]uint16, error)

func (*MutableConfigProvider) RemoveHost

func (mcp *MutableConfigProvider) RemoveHost(host string) *MutableConfigProvider

func (*MutableConfigProvider) Writer

func (mcp *MutableConfigProvider) Writer(lp LazyPath) *ConfigWriter

type PathCopier

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

func (*PathCopier) Exec

func (pc *PathCopier) Exec(l log.Logger) error

func (*PathCopier) String

func (pc *PathCopier) String() string

type PathJoin

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

func (*PathJoin) Path

func (pj *PathJoin) Path() string

type PathProvider

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

func NewPathProvider

func NewPathProvider(p string, isCmd bool) (*PathProvider, error)

func (*PathProvider) CopyTo

func (pp *PathProvider) CopyTo(dir, receiver *PathProvider) Instruction

func (*PathProvider) EnsureDir

func (pp *PathProvider) EnsureDir() error

func (*PathProvider) Join

func (pp *PathProvider) Join(str string) *PathJoin

func (*PathProvider) Path

func (pp *PathProvider) Path() string

func (*PathProvider) SetPath

func (pp *PathProvider) SetPath(p string, isCmd bool) (err error)

type PickOne

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

func (*PickOne) Exec

func (po *PickOne) Exec(l log.Logger) error

func (*PickOne) String

func (po *PickOne) String() string

type Program

type Program []Instruction

func (Program) Exec

func (p Program) Exec(l log.Logger) error

func (Program) String

func (p Program) String() string

type RM

type RM struct {
	*Command
	Name string
	Port uint16
	// contains filtered or unexported fields
}

func (*RM) Start

func (rm *RM) Start() *RMStart

type RMStart

type RMStart RM

func (*RMStart) Exec

func (rms *RMStart) Exec(l log.Logger) error

func (*RMStart) String

func (rms *RMStart) String() string

type Setup

type Setup struct {
	GosBin    *PathProvider
	GosConfig *PathProvider
	GosCert   *PathProvider
	Dir       *PathProvider
	// contains filtered or unexported fields
}

func NewSetup

func NewSetup() *Setup

func (*Setup) AbsorbError

func (s *Setup) AbsorbError(instr Instruction) *AbsorbError

func (*Setup) Exec

func (s *Setup) Exec(l log.Logger) error

func (*Setup) InParallel

func (s *Setup) InParallel(instrs ...Instruction) *InParallel

func (*Setup) Log

func (s *Setup) Log(msg string) LogMsg

func (*Setup) NewCmd

func (s *Setup) NewCmd(exePath *PathProvider, args []string, cwd *PathProvider, env []string) *Command

func (*Setup) NewRM

func (s *Setup) NewRM(name string, port uint16, certPath, configPath LazyPath) *RM

func (*Setup) PickOne

func (s *Setup) PickOne(instrs ...Instruction) *PickOne

func (*Setup) SetEnv

func (s *Setup) SetEnv(envMap harness.TestEnv)

func (*Setup) Sleep

func (s *Setup) Sleep(d time.Duration) *Sleep

func (*Setup) SleepRandom

func (s *Setup) SleepRandom(min, max time.Duration) *Sleep

func (*Setup) String

func (s *Setup) String() string

func (*Setup) UntilError

func (s *Setup) UntilError(instr Instruction) Instruction

func (*Setup) UntilStopped

func (s *Setup) UntilStopped(instr Instruction) *UntilStopped

type Sleep

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

func (*Sleep) Exec

func (s *Sleep) Exec(l log.Logger) error

func (Sleep) String

func (s Sleep) String() string

type UntilError

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

func (*UntilError) Exec

func (ue *UntilError) Exec(l log.Logger) error

func (*UntilError) String

func (ue *UntilError) String() string

type UntilStopped

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

func (*UntilStopped) Exec

func (us *UntilStopped) Exec(l log.Logger) error

func (*UntilStopped) Stop

func (us *UntilStopped) Stop() *UntilStoppedStop

func (*UntilStopped) String

func (us *UntilStopped) String() string

type UntilStoppedStop

type UntilStoppedStop UntilStopped

func (*UntilStoppedStop) Exec

func (uss *UntilStoppedStop) Exec(l log.Logger) error

func (*UntilStoppedStop) String

func (uss *UntilStoppedStop) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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