cache

package
v0.20.21 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsDisallowedModuleError added in v0.20.2

func IsDisallowedModuleError(err error) bool

Types

type CachedModule

type CachedModule struct {
	Instance weak.Pointer[wasi.Module]
	// contains filtered or unexported fields
}

type ErrDisallowedModule added in v0.20.2

type ErrDisallowedModule string

func (ErrDisallowedModule) Error added in v0.20.2

func (err ErrDisallowedModule) Error() string

func (ErrDisallowedModule) Is added in v0.20.2

func (ErrDisallowedModule) Is(err error) bool

type FromURLParams added in v0.20.8

type FromURLParams struct {
	URL      string
	Checksum string
	Insecure bool
	Attrs    ModuleAttrs
}

type ModuleAttrs

type ModuleAttrs struct {
	MaxMemoryMib    uint32
	HostFunctionMap map[string]any
}

type ModuleCache

type ModuleCache struct {
	Globs internal.Globs
	Keys  xcrypto.PublicKeySet
	// contains filtered or unexported fields
}

func NewModuleCache

func NewModuleCache(fsRoot string, globs internal.Globs, keys xcrypto.PublicKeySet) *ModuleCache

func (*ModuleCache) All

func (cache *ModuleCache) All() iter.Seq[*wasi.Module]

func (*ModuleCache) FromSource

func (cache *ModuleCache) FromSource(ctx context.Context, wasm []byte, attrs ModuleAttrs) (*wasi.Module, error)

func (*ModuleCache) FromURL

func (cache *ModuleCache) FromURL(ctx context.Context, params FromURLParams) (*wasi.Module, error)

Jump to

Keyboard shortcuts

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