runtime

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: BSD-3-Clause Imports: 23 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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
)
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) ModulesChanged added in v1.3.0

func (f *Function) ModulesChanged() error

ModulesChanged returns an error when a module this function loaded now resolves elsewhere, e.g. after a library push that left the config commit alone.

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