wasm

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Overview

Package wasm provides WASM-based data source support for tinkerdown. This allows community sources to be distributed as WASM modules.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WasmSource

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

func NewWasmSource

func NewWasmSource(name, path, siteDir string, initConfig map[string]string) (*WasmSource, error)

NewWasmSource creates a new WASM-based source. path is the path to the .wasm file (relative to siteDir or absolute). initConfig contains initialization parameters to pass to the module.

func (*WasmSource) Close

func (s *WasmSource) Close() error

Close releases all resources held by the WASM runtime.

func (*WasmSource) Fetch

func (s *WasmSource) Fetch(ctx context.Context) ([]map[string]interface{}, error)

Fetch retrieves data from the WASM source.

func (*WasmSource) IsReadonly

func (s *WasmSource) IsReadonly() bool

IsReadonly returns whether this source supports write operations.

func (*WasmSource) Name

func (s *WasmSource) Name() string

Name returns the source name.

func (*WasmSource) WriteItem

func (s *WasmSource) WriteItem(ctx context.Context, action string, data map[string]interface{}) error

WriteItem writes data to the WASM source (if supported).

Jump to

Keyboard shortcuts

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