runtime

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxMemory   = 64 * 1024 * 1024 // 64MB
	DefaultMaxExecTime = 30 * time.Second
)

Variables

View Source
var ErrResourceLimitsExceeded = errors.New("plugin exceeded resource limits")

Functions

This section is empty.

Types

type ExecutionResult

type ExecutionResult struct {
	Results []uint64
	Err     error
}

type Runtime

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

func NewRuntime

func NewRuntime(ctx context.Context, config RuntimeConfig) (Runtime, error)

func (Runtime) Close

func (r Runtime) Close(ctx context.Context) error

func (Runtime) Config

func (r Runtime) Config() RuntimeConfig

func (Runtime) ExecuteFunc

func (r Runtime) ExecuteFunc(
	ctx context.Context,
	module api.Module,
	funcName string,
	args ...uint64,
) ExecutionResult

func (Runtime) GetVersion

func (r Runtime) GetVersion() string

func (Runtime) Runtime

func (r Runtime) Runtime() wazero.Runtime

type RuntimeConfig

type RuntimeConfig struct {
	MaxMemoryBytes   uint64
	MaxExecutionTime time.Duration
	Logger           func(string)
}

Jump to

Keyboard shortcuts

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