Documentation ¶
Index ¶
- func Add(e Extension)
- func List() []string
- func Run(extID string, funcName string, arguments []byte, callback func([]byte)) error
- type Extension
- type MemFSNode
- func (m MemFSNode) Close() error
- func (m *MemFSNode) Exists(segs []string) bool
- func (m *MemFSNode) GetNode(segs []string) *MemFSNode
- func (m *MemFSNode) HasSubdir(name string) bool
- func (m MemFSNode) Info() (fs.FileInfo, error)
- func (m *MemFSNode) Insert(segs []string, fileNode *MemFSNode)
- func (m MemFSNode) IsDir() bool
- func (m MemFSNode) ModTime() time.Time
- func (m MemFSNode) Mode() fs.FileMode
- func (m MemFSNode) Name() string
- func (m *MemFSNode) ParentSegs(segs []string) []string
- func (m MemFSNode) Read(buf []byte) (int, error)
- func (m MemFSNode) ReadDir(n int) ([]fs.DirEntry, error)
- func (m MemFSNode) Size() int64
- func (m MemFSNode) Stat() (fs.FileInfo, error)
- func (m MemFSNode) Sys() interface{}
- func (m MemFSNode) Type() fs.FileMode
- type WasmExtension
- type WasmMemoryFS
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MemFSNode ¶
type MemFSNode struct { BaseName string Subdirs map[string]*MemFSNode // tree entires (directories only) FileNodes map[string]*MemFSNode // tree entires (files only) // contains filtered or unexported fields }
MemFSNode - A makeshift in-memory fill system node, this object implements both the fs.File and fs.FileInfo interfaces.
func (*MemFSNode) Exists ¶
Exists - Should never be passed an empty slice, recursively calls exists on each segment until the last segment is reached
func (*MemFSNode) HasSubdir ¶
HasSubdir - Returns true if the directory has a subdir with the given name
func (*MemFSNode) ParentSegs ¶
type WasmExtension ¶
type WasmExtension struct { Name string Stdin *wasmPipe Stdout *wasmPipe Stderr *wasmPipe // contains filtered or unexported fields }
WasmExtension - Wasm extension
func NewWasmExtension ¶
NewWasmExtension - Create a new Wasm extension
func (*WasmExtension) Execute ¶
func (w *WasmExtension) Execute(args []string) (uint32, error)
Execute - Execute the Wasm module with arguments, blocks during execution, returns errors
func (*WasmExtension) IsExecuting ¶
func (w *WasmExtension) IsExecuting() bool
IsExecuting - Check if the Wasm module runtime is currently executing
type WasmMemoryFS ¶
type WasmMemoryFS struct {
// contains filtered or unexported fields
}
WasmMemoryFS - A makeshift read only in-memory virtual file system backed by a map of names to bytes the key is the absolute path to the file and the bytes are the contents of the file empty directories are not supported.