vm

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: BSD-3-Clause Imports: 16 Imported by: 0

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