runtime

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compile

func Compile(ctx context.Context, cache wazero.CompilationCache, blob []byte) error

func Run

func Run(ctx context.Context, cache wazero.CompilationCache, blob []byte, req RequestPlugin) error

Types

type RequestModule

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

func NewRequestModule

func NewRequestModule(r *http.Request) (*RequestModule, error)

TODO: could probably do more optimized stuff for larger bodies. We want to limit the body size though...

func (*RequestModule) Close

func (r *RequestModule) Close(ctx context.Context) error

func (*RequestModule) Instanciate

func (r *RequestModule) Instanciate(ctx context.Context, runtime wazero.Runtime) error

func (*RequestModule) WriteResponse

func (r *RequestModule) WriteResponse(w io.Writer) (int, error)

type RequestPlugin

type RequestPlugin interface {
	Instanciate(context.Context, wazero.Runtime) error
	WriteResponse(io.Writer) (int, error)
	Close(context.Context) error
}

Jump to

Keyboard shortcuts

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