wasm

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Resolver

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

Resolver implements the resolver.Resolver interface using Wasm modules to perform an evaluation.

func New

func New(entrypoints []ast.Ref, policy []byte, data interface{}) (*Resolver, error)

New creates a new Resolver instance which is using the Wasm module policy for the given entrypoint ref.

func (*Resolver) Close

func (r *Resolver) Close()

Close shuts down the resolver.

func (*Resolver) Entrypoints

func (r *Resolver) Entrypoints() []ast.Ref

Entrypoints returns a list of entrypoints this resolver is configured to perform evaluations on.

func (*Resolver) Eval

func (r *Resolver) Eval(ctx context.Context, input resolver.Input) (resolver.Result, error)

Eval performs an evaluation using the provided input and the Wasm module associated with this Resolver instance.

func (*Resolver) RemoveDataPath

func (r *Resolver) RemoveDataPath(ctx context.Context, path []string) error

RemoveDataPath will remove any data at the specified path.

func (*Resolver) SetData

func (r *Resolver) SetData(ctx context.Context, data interface{}) error

SetData will update the external data for the Wasm instance.

func (*Resolver) SetDataPath

func (r *Resolver) SetDataPath(ctx context.Context, path []string, data interface{}) error

SetDataPath will set the provided data on the wasm instance at the specified path.

Jump to

Keyboard shortcuts

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