actrs

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: 27 Imported by: 0

Documentation

Index

Constants

View Source
const KindRuntime = "runtime"
View Source
const KindWasmServer = "wasm_server"

Variables

This section is empty.

Functions

func NewRuntime

func NewRuntime(store storage.Store, metricStore storage.MetricStore, cache storage.ModCacher) actor.Producer

func NewWasmServer

func NewWasmServer(addr string, cluster *cluster.Cluster, store storage.Store, metricStore storage.MetricStore, cache storage.ModCacher) actor.Producer

NewWasmServer return a new wasm server given a storage and a mod cache.

Types

type RequestModule

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

func NewRequestModule

func NewRequestModule(req *proto.HTTPRequest) (*RequestModule, error)

func (*RequestModule) Close

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

func (*RequestModule) Instantiate

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

func (*RequestModule) WriteResponse

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

type Runtime

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

Runtime is an actor that can execute compiled WASM blobs in a distributed cluster.

func (*Runtime) Receive

func (r *Runtime) Receive(c *actor.Context)

type WasmServer

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

WasmServer is an HTTP server that will proxy and route the request to the corresponding function.

func (*WasmServer) Receive

func (s *WasmServer) Receive(c *actor.Context)

func (*WasmServer) ServeHTTP

func (s *WasmServer) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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