wasm

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleBundle

func HandleBundle(h *hive.Hive, bundle *bundle.Bundle) error

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

func HandleBundleAtPath added in v0.1.1

func HandleBundleAtPath(h *hive.Hive, path string) error

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

func UseLogger added in v0.2.2

func UseLogger(l *vlog.Logger)

UseLogger sets the logger to be used by Wasm Runnables

Types

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 added in v0.3.0

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

OnChange evt ChangeEventruns when a worker starts using this Runnable

func (*Runner) Run

func (w *Runner) Run(job hive.Job, ctx *hive.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