Documentation
¶
Index ¶
- func LoadJSModules(ctx context.Context, path string, r *goja.Runtime, logger Logger) error
- func LoadLuaModules(ctx context.Context, path string, l *lua.LState, logger Logger) error
- func MapJSNK(r *goja.Runtime, nk RuntimeModule, timeout time.Duration, reg *HookRegistry)
- func MapLuaNK(l *lua.LState, nk RuntimeModule, reg *HookRegistry)
- func NewCronClusterLock(client *redis.Client, nodeID string) *internalruntime.CronClusterLock
- func NewGoRuntimeModule(dbPool *pgxpool.Pool, logger Logger) *internalruntime.GoRuntimeModule
- type Account
- type AfterHook
- type BeforeHook
- type CronScheduler
- type Friend
- type GoRuntimeManager
- type GroupView
- type HookRegistry
- type InitModuleFunc
- type Initializer
- type Leaderboard
- type LeaderboardRecord
- type Logger
- type Match
- type MatchData
- type MatchInfo
- type NotificationView
- type Presence
- type RPCHandler
- type RuntimeModule
- type StorageDelete
- type StorageObject
- type StorageObjectAck
- type StorageRead
- type StorageWrite
- type TournamentView
- type UserView
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func LoadJSModules ¶
LoadJSModules loads JavaScript scripts from runtime path.
func LoadLuaModules ¶
LoadLuaModules loads Lua scripts from runtime path.
func MapJSNK ¶
func MapJSNK(r *goja.Runtime, nk RuntimeModule, timeout time.Duration, reg *HookRegistry)
MapJSNK registers JavaScript nk bindings.
func MapLuaNK ¶
func MapLuaNK(l *lua.LState, nk RuntimeModule, reg *HookRegistry)
MapLuaNK registers Lua nk bindings.
func NewCronClusterLock ¶
func NewCronClusterLock(client *redis.Client, nodeID string) *internalruntime.CronClusterLock
NewCronClusterLock creates a cluster lock backed by Redis.
func NewGoRuntimeModule ¶
func NewGoRuntimeModule(dbPool *pgxpool.Pool, logger Logger) *internalruntime.GoRuntimeModule
NewGoRuntimeModule constructs a new GoRuntimeModule instance backed by a DB pool.
Types ¶
type AfterHook ¶
type AfterHook = internalruntime.AfterHook
type BeforeHook ¶
type BeforeHook = internalruntime.BeforeHook
type CronScheduler ¶
type CronScheduler = internalruntime.CronScheduler
CronScheduler manages cron jobs registered in the server runtime.
func NewCronScheduler ¶
func NewCronScheduler(registry *HookRegistry, logger Logger, db *sql.DB, nk RuntimeModule) *CronScheduler
NewCronScheduler constructs a new runtime CronScheduler.
type Friend ¶
type Friend = internalruntime.Friend
type GoRuntimeManager ¶
type GoRuntimeManager = internalruntime.GoRuntimeManager
GoRuntimeManager manages Go runtime plugins and native registrations.
func NewGoRuntimeManager ¶
func NewGoRuntimeManager(logger Logger, db *sql.DB, nk RuntimeModule) *GoRuntimeManager
NewGoRuntimeManager constructs a Go runtime manager.
type GroupView ¶
type GroupView = internalruntime.GroupView
type HookRegistry ¶
type HookRegistry = internalruntime.HookRegistry
HookRegistry holds all registered RPCs, hooks, and match factories.
type InitModuleFunc ¶
type InitModuleFunc = internalruntime.InitModuleFunc
InitModuleFunc is the entry point function signature for Go game modules.
type Initializer ¶
type Initializer = internalruntime.Initializer
Initializer defines the handler registration interface for Go modules.
type Leaderboard ¶
type Leaderboard = internalruntime.Leaderboard
type LeaderboardRecord ¶
type LeaderboardRecord = internalruntime.LeaderboardRecord
type Match ¶
type Match = internalruntime.Match
Match defines the authoritative multiplayer match interface.
type MatchData ¶
type MatchData = internalruntime.MatchData
MatchData defines match payload messages passed into MatchLoop.
type MatchInfo ¶
type MatchInfo = internalruntime.MatchInfo
type NotificationView ¶
type NotificationView = internalruntime.NotificationView
type Presence ¶
type Presence = internalruntime.Presence
Presence defines client presence within a match.
type RPCHandler ¶
type RPCHandler = internalruntime.RPCHandler
type RuntimeModule ¶
type RuntimeModule = internalruntime.RuntimeModule
RuntimeModule defines the interface exposed to Go game logic (nk).
type StorageDelete ¶
type StorageDelete = internalruntime.StorageDelete
type StorageObject ¶
type StorageObject = internalruntime.StorageObject
type StorageObjectAck ¶
type StorageObjectAck = internalruntime.StorageObjectAck
type StorageWrite ¶
type StorageWrite = internalruntime.StorageWrite
type TournamentView ¶
type TournamentView = internalruntime.TournamentView
type UserView ¶
type UserView = internalruntime.UserView