automation

package
v0.3.8 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2024 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker added in v0.3.0

type Broker interface {
	Publish(*eventsv1.Event) error
	Subscribe(string, chan *eventsv1.Event)
}

type CoreModule

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

func NewCoreModule

func NewCoreModule(engine *Engine, broker Broker) *CoreModule

func (*CoreModule) Enable

func (c *CoreModule) Enable(r *goja.Runtime)

type Engine

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

func New

func New(name string, cfg config.Config, broker Broker, opts ...EngineOption) (*Engine, error)

func (*Engine) Config added in v0.3.0

func (e *Engine) Config() config.Config

func (*Engine) EventLoop added in v0.3.0

func (e *Engine) EventLoop() *eventloop.EventLoop

func (*Engine) PackagePath added in v0.3.0

func (e *Engine) PackagePath() string

func (*Engine) Registry

func (e *Engine) Registry() *require.Registry

func (*Engine) Run added in v0.3.0

func (e *Engine) Run(fn func(*goja.Runtime) (goja.Value, error)) (goja.Value, error)

func (*Engine) RunScript

func (e *Engine) RunScript(script string) (goja.Value, error)

func (*Engine) Runtime added in v0.3.0

func (e *Engine) Runtime() *goja.Runtime

func (*Engine) Stop

func (e *Engine) Stop() int

type EngineOption

type EngineOption func(*Engine)

func WithBaseDirectory added in v0.3.0

func WithBaseDirectory(dir string) EngineOption

func WithConsole added in v0.3.0

func WithConsole(printer console.Printer) EngineOption

func WithModulsRegistry added in v0.3.0

func WithModulsRegistry(reg *modules.Registry) EngineOption

func WithSourceLoader added in v0.3.0

func WithSourceLoader(ldr require.SourceLoader) EngineOption

Directories

Path Synopsis
encoding
Package encoding provides a k6 JS module that implements the TextEncoder and TextDecoder interfaces.
Package encoding provides a k6 JS module that implements the TextEncoder and TextDecoder interfaces.
fs

Jump to

Keyboard shortcuts

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