Versions in this module Expand all Collapse all v0 v0.2.0 Apr 11, 2026 v0.1.0 Feb 21, 2026 Changes in this version + type ExecuteOption func(*executeConfig) + func WithExternalFunc(fn ExternalFunc, funcs ...FuncDef) ExecuteOption + func WithLimits(l Limits) ExecuteOption + func WithOsCallFunc(fn OsCallFunc) ExecuteOption + func WithPrintFunc(fn func(string)) ExecuteOption + type ExternalFunc func(ctx context.Context, call *FunctionCall) (any, error) + type FuncDef struct + Name string + Params []string + func Func(name string, params ...string) FuncDef + type FunctionCall struct + Args map[string]any + CallID uint32 + Name string + func (fc *FunctionCall) ArgsJSON() string + type Limits struct + MaxAllocations uint64 + MaxDuration time.Duration + MaxMemoryBytes uint64 + MaxRecursionDepth uint32 + func (l Limits) MarshalJSON() ([]byte, error) + type MontyError struct + Message string + func (e *MontyError) Error() string + type OsCall struct + Args []any + CallID uint32 + Function string + Kwargs map[string]any + type OsCallFunc func(ctx context.Context, call *OsCall) (any, error) + type Runner struct + func New() (*Runner, error) + func (r *Runner) Close() error + func (r *Runner) Execute(ctx context.Context, code string, inputs map[string]any, opts ...ExecuteOption) (any, error)