vm

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0 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           = 1024 * 64
	InstanceMaxError      int64         = 10
	InstanceErrorCoolDown time.Duration = 30 * time.Minute

	ShadowBuff                        = 10
	ShadowMaxAge        time.Duration = 10 * time.Minute
	ShadowCleanInterval time.Duration = ShadowMaxAge / 2
)

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, branch, commit string) (*Function, error)

func (*Function) Call added in v1.0.11

func (f *Function) Call(runtime vm.Runtime, id uint32) (err error)

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

func (*Function) CallTime added in v1.1.0

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

func (*Function) ColdStart added in v1.1.0

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

func (*Function) Instantiate

func (f *Function) Instantiate() (runtime vm.Runtime, pluginApi interface{}, err error)

Instantiate returns a runtime, plugin api, and error

func (*Function) MemoryMax added in v1.1.0

func (f *Function) MemoryMax() uint64

func (*Function) Shadows added in v1.1.0

func (f *Function) Shadows() *Shadows

type Shadows added in v1.1.0

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

func (*Shadows) Count added in v1.1.0

func (s *Shadows) Count() int64

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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