wasi

package
v0.0.0-...-d93df49 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MapItem

type MapItem struct {
	RT               *WasiRuntime
	InitFinishedCond *sync.Cond
	UserCount        uint32
}

type RuntimeManager

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

func GetRTManager

func GetRTManager() *RuntimeManager

func (*RuntimeManager) Add

func (rtm *RuntimeManager) Add(id string) bool

func (*RuntimeManager) Destroy

func (rtm *RuntimeManager) Destroy(id string)

func (*RuntimeManager) GetByID

func (rtm *RuntimeManager) GetByID(id string) (*WasiRuntime, *sync.Cond)

func (*RuntimeManager) InitRT

func (rtm *RuntimeManager) InitRT(id string, context context.Context,
	withSharedCache bool, logEnabled bool)

func (*RuntimeManager) SetRTParams

func (rtm *RuntimeManager) SetRTParams(id string, cacheDirPath string, compiledWasiPath string)

func (*RuntimeManager) SetRTcbFunc

func (rtm *RuntimeManager) SetRTcbFunc(id string, nodeType string, cbFunc WasiCallbackFunction)

type WasiCallbackFunction

type WasiCallbackFunction func(string) string

type WasiRuntime

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

func NewWasiRuntime

func NewWasiRuntime() *WasiRuntime

func (*WasiRuntime) Init

func (wr *WasiRuntime) Init(context context.Context, withSharedCache bool, logEnabled bool)

func (*WasiRuntime) IsReady

func (wr *WasiRuntime) IsReady() bool

func (*WasiRuntime) Run

func (wr *WasiRuntime) Run(inputJSON string, messageJSON string, flags uint64) string

func (*WasiRuntime) SetCBFunction

func (wr *WasiRuntime) SetCBFunction(nodeType string, cbFunc WasiCallbackFunction)

func (*WasiRuntime) SetUsedNodeType

func (wr *WasiRuntime) SetUsedNodeType(nodeType string)

func (*WasiRuntime) SetWasiParams

func (wr *WasiRuntime) SetWasiParams(cacheDirPath string, compiledWasiPath string)

func (*WasiRuntime) Shutdown

func (wr *WasiRuntime) Shutdown()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳