script

package
v0.4.5 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2024 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Little = "LittleEndian"
	Big    = "BigEndian"
)

Variables

View Source
var (
	ErrNil = lua.LString("nil")
)

Functions

func RegisterMessageType

func RegisterMessageType(L *lua.LState)

Registers type to given L.

Types

type Base64Module

type Base64Module struct {
}

func (*Base64Module) Decode

func (b *Base64Module) Decode(l *lua.LState) int

func (*Base64Module) Encode

func (b *Base64Module) Encode(l *lua.LState) int

func (*Base64Module) Loader

func (b *Base64Module) Loader(l *lua.LState) int

type HttpModule

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

func NewHttpModule

func NewHttpModule() *HttpModule

func NewHttpModuleWithDo

func NewHttpModuleWithDo(client *http.Client) *HttpModule

func (*HttpModule) GetReport

func (h *HttpModule) GetReport() []Report

func (*HttpModule) Loader

func (h *HttpModule) Loader(L *lua.LState) int

type LogModule added in v0.4.5

type LogModule struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func (*LogModule) Clean added in v0.4.5

func (lm *LogModule) Clean()

func (*LogModule) Loader added in v0.4.5

func (lm *LogModule) Loader(L *lua.LState) int

func (*LogModule) Pop added in v0.4.5

func (lm *LogModule) Pop() string

type MD5Module

type MD5Module struct {
}

func (*MD5Module) Loader

func (m *MD5Module) Loader(l *lua.LState) int

func (*MD5Module) Sum

func (m *MD5Module) Sum(l *lua.LState) int

type Message

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

type MgoModule

type MgoModule struct {
	Url    string
	DBName string
	// contains filtered or unexported fields
}

func NewMgoModule

func NewMgoModule() *MgoModule

func (*MgoModule) Loader

func (m *MgoModule) Loader(L *lua.LState) int

type ProtoModule

type ProtoModule struct {
}

func (*ProtoModule) Loader

func (p *ProtoModule) Loader(l *lua.LState) int

func (*ProtoModule) Marshal

func (p *ProtoModule) Marshal(L *lua.LState) int

func (*ProtoModule) Unmarshal

func (p *ProtoModule) Unmarshal(L *lua.LState) int

type Report

type Report struct {
	MsgID string
	Err   string
}

Report 网络层在处理消息时的信息

因为流式消息无法保证 req/res 配对,因此不再记录消费时间

type TCPModule

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

func NewTCPModule

func NewTCPModule() *TCPModule

func (*TCPModule) Close

func (t *TCPModule) Close(L *lua.LState) int

func (*TCPModule) GetReport

func (t *TCPModule) GetReport() []Report

func (*TCPModule) Loader

func (t *TCPModule) Loader(L *lua.LState) int

type UtilsModule

type UtilsModule struct {
}

func (*UtilsModule) Loader

func (u *UtilsModule) Loader(l *lua.LState) int

func (*UtilsModule) Random

func (u *UtilsModule) Random(l *lua.LState) int

func (*UtilsModule) UUID

func (u *UtilsModule) UUID(l *lua.LState) int

type WebsocketModule

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

func NewWebsocketModule

func NewWebsocketModule() *WebsocketModule

func (*WebsocketModule) Close

func (ws *WebsocketModule) Close(L *lua.LState) int

func (*WebsocketModule) GetReport

func (ws *WebsocketModule) GetReport() []Report

func (*WebsocketModule) Loader

func (ws *WebsocketModule) Loader(L *lua.LState) int

Jump to

Keyboard shortcuts

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