runtime

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadJSModules

func LoadJSModules(ctx context.Context, path string, r *goja.Runtime, logger Logger) error

LoadJSModules loads JavaScript scripts from runtime path.

func LoadLuaModules

func LoadLuaModules(ctx context.Context, path string, l *lua.LState, logger Logger) error

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 Account

type Account = internalruntime.Account

User, Leaderboard, and Domain 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 Logger

type Logger = internalruntime.Logger

Logger defines the runtime logging interface.

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 StorageRead

type StorageRead = internalruntime.StorageRead

Storage types

type StorageWrite

type StorageWrite = internalruntime.StorageWrite

type TournamentView

type TournamentView = internalruntime.TournamentView

type UserView

type UserView = internalruntime.UserView

Jump to

Keyboard shortcuts

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