interpreter

package
v0.0.0-...-dacc0c8 Latest Latest
Warning

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

Go to latest
Published: Jun 27, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrCanceled = errors.New("canceled")

Functions

This section is empty.

Types

type EvalOptions

type EvalOptions struct {
	OnStdout func([]byte)
	OnStderr func([]byte)
	OnPanic  func(interface{})
}

type Session

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

func NewSession

func NewSession(ctx context.Context) *Session

func (*Session) Eval

func (s *Session) Eval(ctx context.Context, code string, opts EvalOptions) (reflect.Value, time.Duration, error)

func (*Session) Package

func (s *Session) Package(name string) *exportBuilder

func (*Session) Use

func (s *Session) Use(exports interp.Exports)

Jump to

Keyboard shortcuts

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