interpreter

package
v0.0.0-...-1c95f08 Latest Latest
Warning

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

Go to latest
Published: Mar 2, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	EnableHttp, _     = config.GetBool("ENABLE_HTTP", false)
	EnableNSQL, _     = config.GetBool("ENABLE_NSQL", false)
	EnableNSOutput, _ = config.GetBool("ENABLE_NSOUTPUT", true)
	EnableNSFTP, _    = config.GetBool("ENABLE_NSFTP", false)
	EnableNSSFTP, _   = config.GetBool("ENABLE_NSSFTP", false)
	EnableNSObject, _ = config.GetBool("ENABLE_NSOBJECT", false)
	EnableNSKV, _     = config.GetBool("ENABLE_NSKV", false)
	EnableNSStream, _ = config.GetBool("ENABLE_NSSTREAM", false)
	EnableNSUtil, _   = config.GetBool("ENABLE_NSUTIL", true)
)
View Source
var (
	Lua       = stats.New("lua")
	DoREPL    = Lua.NewCounter("DoREPL")
	ErrDoREPL = Lua.NewCounter("ErrDoREPL")
)

Functions

func NewLuaInterpreter

func NewLuaInterpreter(rLimit rlimit.ResourceLimit) rtepub.Interpreter

Types

type ExecutionContext

type ExecutionContext struct {
	Args map[string]interface{}
}

type LuaInterpreter

type LuaInterpreter struct {
	State *State
	// contains filtered or unexported fields
}

func (*LuaInterpreter) DoREPL

func (i *LuaInterpreter) DoREPL(input *rtepub.Input) *rtepub.Output

func (*LuaInterpreter) Terminate

func (i *LuaInterpreter) Terminate()

type State

type State struct {
	LuaState *lua.LState
	Output   *nsOutput.NsOutputModule
	NSQL     *nsQL.NsQLModule
	// contains filtered or unexported fields
}

func CreateState

func CreateState(input *rtepub.Input) (*State, error)

func (*State) Clean

func (s *State) Clean()

func (*State) Close

func (s *State) Close()

Jump to

Keyboard shortcuts

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