plugins

package
v0.0.0-...-bbd6646 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ZenPluginRegistry = PluginRegistry{
	Executor: nil,
	Runner:   nil,
}

Functions

func Load

func Load(paths ...string) error

func LoadPlugin

func LoadPlugin(path string) error

func RegisterRunnerArgs

func RegisterRunnerArgs(runner Runner, args []RunnerArg) Runner

func RegisterRunnerFlags

func RegisterRunnerFlags(runner Runner, flags map[string]RunnerFlag) Runner

Types

type DefaultExecutor

type DefaultExecutor struct {
	Path string
}

func (*DefaultExecutor) Clone

func (e *DefaultExecutor) Clone() pkg.Executor

func (*DefaultExecutor) Execute

func (e *DefaultExecutor) Execute(stdin io.Reader, argv []string) (zen.Output, error)

func (*DefaultExecutor) SetPath

func (e *DefaultExecutor) SetPath(path string)

type DefaultRunner

type DefaultRunner struct {
	TestExec    pkg.Executor
	CorrectExec pkg.Executor
}

func (*DefaultRunner) Args

func (r *DefaultRunner) Args() []pkg.RunnerArg

func (*DefaultRunner) Init

func (r *DefaultRunner) Init(args []string, exec pkg.Executor) error

func (*DefaultRunner) Run

func (r *DefaultRunner) Run(emitResults chan pkg.Results, rtArgv []string)

type ExecutorPlugin

type ExecutorPlugin interface {
	BuildExecutor(options map[string]interface{}) Executor
}

type PluginRegistry

type PluginRegistry struct {
	Executor pkg.Executor
	Runner   pkg.Runner
}

type PluginType

type PluginType int
const (
	RunnerType   PluginType = 1
	ExecutorType PluginType = 2
	LastLoaded   PluginType = 128
)

Jump to

Keyboard shortcuts

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