scripting

package
v3.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package scripting provides a generic abstraction layer for running scripts at runtime.

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = Options{
	StackDepthLimit: 32,
	Timeout:         100 * time.Millisecond,
}

DefaultOptions are the default Options.

Functions

This section is empty.

Types

type AheadOfTimeEngine added in v3.18.0

type AheadOfTimeEngine interface {
	Engine

	Compile(ctx context.Context, script string) (run func(context.Context, string, ...any) (func(any) error, error), err error)
}

AheadOfTimeEngine extends Engine with the capability of compiling the script ahead of time.

type Engine

type Engine interface {
	Run(ctx context.Context, script, fn string, params ...any) (func(target any) error, error)
}

Engine represents a scripting engine.

type Options

type Options struct {
	StackDepthLimit int
	Timeout         time.Duration
}

Options contains engine options.

Directories

Path Synopsis
Package javascript implements a Javascript scripting engine.
Package javascript implements a Javascript scripting engine.

Jump to

Keyboard shortcuts

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