runtime

package
v0.6.0-rc9 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InstancePool

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

InstancePool is a factory for Wasm instances

func NewInstancePool

func NewInstancePool(ref *tenant.WasmModuleRef, api api.HostAPI) *InstancePool

NewInstancePool creates a new InstancePool

func (*InstancePool) AddInstance

func (ip *InstancePool) AddInstance() error

AddInstance adds a new Wasm instance to the environment's pool

func (*InstancePool) RemoveInstance

func (ip *InstancePool) RemoveInstance() error

RemoveInstance removes one of the active instances from rotation and destroys it

func (*InstancePool) UseInstance

func (ip *InstancePool) UseInstance(ctx *scheduler.Ctx, instFunc func(*instance.Instance, int32)) error

UseInstance provides an instance from the environment's pool to be used by a callback function

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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