rwasm

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2021 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleBundle

func HandleBundle(h *rt.Reactr, bundle *bundle.Bundle) error

HandleBundle loads a .wasm.zip file into the rt instance

func HandleBundleAtPath

func HandleBundleAtPath(h *rt.Reactr, path string) error

HandleBundleAtPath loads a .wasm.zip file into the rt instance

func UseLogger

func UseLogger(l *vlog.Logger)

UseLogger sets the logger to be used by Wasm Runnables

Types

type HostFn

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

HostFn describes a host function callable from within a Runnable module

type Runner

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

Runner represents a wasm-based runnable

func NewRunner

func NewRunner(filepath string) *Runner

NewRunner returns a new *Runner

func (*Runner) OnChange

func (w *Runner) OnChange(evt rt.ChangeEvent) error

OnChange evt ChangeEventruns when a worker starts using this Runnable

func (*Runner) Run

func (w *Runner) Run(job rt.Job, ctx *rt.Ctx) (interface{}, error)

Run runs a Runner

Jump to

Keyboard shortcuts

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