executor

package module
v0.0.0-...-80ad060 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2022 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Deploy

func Deploy(srv *http.Server, topology lib.Topology, m lib.Marshaler)

func DeployRaw

func DeployRaw(srv *http.Server, testId lib.TestId, m lib.Marshaler, constructor func(string) lib.Reactor)

func DeployWithComponentUpdate

func DeployWithComponentUpdate(srv *http.Server, topology lib.Topology, m lib.Marshaler, cu ComponentUpdate)

func EmitExecutionStepEvent

func EmitExecutionStepEvent(db *sql.DB, event ExecutionStepEvent)

Types

type ComponentUpdate

type ComponentUpdate = func(component string) StepInfo

type ExecutionStepEvent

type ExecutionStepEvent struct {
	Meta          lib.MetaInfo
	Reactor       string
	SimulatedTime time.Time
	LogLines      []string
	HeapDiff      json.RawMessage
}

We should probably have what kind of step this is, message vs. timer

type Executor

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

func NewExecutor

func NewExecutor(marshaler lib.Marshaler, logger *zap.Logger, reactorNames []string, constructor func(name string, logger *zap.Logger) lib.Reactor) *Executor

func (*Executor) Deploy

func (e *Executor) Deploy(srv *http.Server)

func (*Executor) ReactorTopology

func (e *Executor) ReactorTopology() lib.Topology

func (*Executor) Register

func (e *Executor) Register()

func (*Executor) Reset

func (e *Executor) Reset()

func (*Executor) SetTestId

func (e *Executor) SetTestId(testId lib.TestId)

type LogWriter

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

func (*LogWriter) AppendToLogger

func (lw *LogWriter) AppendToLogger(logger *zap.Logger) *zap.Logger

func (*LogWriter) Sync

func (_ *LogWriter) Sync() error

func (*LogWriter) Write

func (lw *LogWriter) Write(p []byte) (n int, err error)

type StepInfo

type StepInfo struct {
	LogLines []string
}

Jump to

Keyboard shortcuts

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