webassembly

package
v1.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2023 License: MIT Imports: 24 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init(config Config) (pdfium.Pool, error)

Init will return a multithreaded webassembly pool. It will launch a new worker for every requested instance as long as the limits allow it. If the pool has been exhausted. It will wait until a worker becomes available. So it's important that you close instances when you're done with them.

Types

type Config

type Config struct {
	MinIdle      int
	MaxIdle      int
	MaxTotal     int
	WASM         []byte
	FSConfig     wazero.FSConfig
	Stdout       io.Writer
	Stderr       io.Writer
	RandomSource io.Reader
	ReuseWorkers bool // WebAssembly runtime by default doesn't use workers because creating new instances is cheap.
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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