Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Destroy ¶
func Destroy()
Destroy cleans up all registered modules and waits for their completion. It should be called when the application is shutting down.
func Init ¶
func Init()
Init initializes all registered modules and starts them in separate goroutines. It should be called before starting any modules.
func MustConf ¶
func MustConf(conf ModuleConf)
MustConf sets the default configuration for modules. It should be called before initializing any modules.
Types ¶
type Module ¶
type Module interface {
// Init initializes the module and prepares it for use.
// This method should be called before using any other methods of the module.
Init()
// Destroy cleans up resources used by the module.
Destroy()
// Run starts the module's main loop or process.
Run(done chan struct{})
}
Module interface defines the structure for a module in the system. It includes methods for initialization, destruction, and running the module.
type ModuleConf ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
algo
|
|
|
Package container provides a simple in-memory cache with expiration.
|
Package container provides a simple in-memory cache with expiration. |
|
gnetx
|
|
|
Package player provides a heartbeat manager for managing player connections and sending heartbeat signals.
|
Package player provides a heartbeat manager for managing player connections and sending heartbeat signals. |
|
utils
|
|
|
Package zeromq provides a wrapper for ZeroMQ, a messaging library that implements the ZeroMQ protocol, It provides functions for sending and receiving messages using ZeroMQ, and supports DEALER, ROUTER, PUB, SUB modes.
|
Package zeromq provides a wrapper for ZeroMQ, a messaging library that implements the ZeroMQ protocol, It provides functions for sending and receiving messages using ZeroMQ, and supports DEALER, ROUTER, PUB, SUB modes. |
Click to show internal directories.
Click to hide internal directories.