Documentation
¶
Index ¶
- Constants
- func ConsoleLog(ctx *quickjs.Context, value []quickjs.Value) quickjs.Value
- func EnvChecker(perms *options.Perms)
- func FileSystemChecker(perms *options.Perms)
- func Marshal(jsonObj interface{}) ([]byte, error)
- func NetChecker(perms *options.Perms)
- func OpenPlugin(path string, arg interface{}) interface{}
- func PrepareRuntimeContext(cxt *quickjs.Context, jsruntime quickjs.Runtime, args []string, ...)
- func RenioRecvNameSpace(renio *options.Renio) ...
- func RenioSendNameSpace(renio *options.Renio) ...
- func Run(opt options.Options)
- type Formatter
Constants ¶
const ( // FileSystem ops FSWrite = 1 FSRead = 2 FSExists = 3 FSDirExists = 4 FSCwd = 5 FSStat = 6 FSRemove = 7 FSMkdir = 9 FSWalk = 14 // console ops Log = 10 // env ops Env = 11 // plugin ops Plugin = 15 // fetch ops Fetch = 20 // serve ops Serve = 25 )
Variables ¶
This section is empty.
Functions ¶
func ConsoleLog ¶
console.log bindings to quickjs engine
func EnvChecker ¶
func FileSystemChecker ¶
FileSystemChecker utility to check whether file system access is avaliable or not
func NetChecker ¶
NetChecker utility to check whether net access is avaliable or not
func OpenPlugin ¶
func OpenPlugin(path string, arg interface{}) interface{}
OpenPlugin open a dynamic lib and call the exported RenioPlugin function with the args provided by the plugin op Currently, not compatible with windows
func PrepareRuntimeContext ¶
func PrepareRuntimeContext(cxt *quickjs.Context, jsruntime quickjs.Runtime, args []string, flags *options.Perms, mode string)
PrepareRuntimeContext prepare the runtime and context with Renio's internal ops injects `__send` and `__recv` global dispatch functions into runtime
func RenioRecvNameSpace ¶
func RenioRecvNameSpace(renio *options.Renio) func(ctx *quickjs.Context, this quickjs.Value, args []quickjs.Value) quickjs.Value
RenioRecvNameSpace Native function corresponding to the JavaScript global `__recv` It is binded with `__recv` and accepts arguments including recv ID of the async function
func RenioSendNameSpace ¶
func RenioSendNameSpace(renio *options.Renio) func(ctx *quickjs.Context, this quickjs.Value, args []quickjs.Value) quickjs.Value
RenioSendNameSpace Native function corresponding to the JavaScript global `__send` It is binded with `__send` and accepts arguments including op ID