runtime

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InstanceMaxRequests   int           = 64
	InstanceMaxError      int64         = 5
	InstanceErrorCoolDown time.Duration = 30 * time.Minute

	ShadowMinBuff                     = 3
	ShadowMaxAge        time.Duration = 10 * time.Minute
	ShadowCleanInterval time.Duration = ShadowMaxAge / 2

	ShadowMaxWait time.Duration = 1 * time.Second

	MaxGlobalInstances int64  = 128 * 1024
	MemoryThreshold    uint64 = 80

	DefaultWasmMemory uint64 = 4 * 1024 * 1024 * 1024
)
View Source
var DebugFunctionCallsLogger vm.Logger

Functions

This section is empty.

Types

type Function

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

func New

func New(ctx context.Context, serviceable components.FunctionServiceable) (*Function, error)

func (*Function) Call

func (f *Function) Call(inst Instance, id uint32) (err error)

Call takes instance and id, then calls the moduled function. Returns an error.

func (*Function) CallTime

func (f *Function) CallTime() time.Duration

func (*Function) ColdStart

func (f *Function) ColdStart() time.Duration

func (*Function) Instantiate

func (f *Function) Instantiate(ctx context.Context) (Instance, error)

Instantiate returns a runtime, plugin api, and error

func (*Function) MemoryMax

func (f *Function) MemoryMax() uint64

func (*Function) Shutdown added in v1.1.9

func (f *Function) Shutdown()

type Instance added in v1.1.9

type Instance interface {
	Free() error
	Module(name string) (vm.ModuleInstance, error)
	SDK() plugins.Instance
	Stdout() io.Reader
	Stderr() io.Reader
	Ready() (Instance, error)
	Close() error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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