Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Module ¶
type Module interface {
// Returns the module name.
Name() string
// Initializes the module.
Init(*models.Session, *models.Participant)
// Handles a given message. Modules are free to decide whether they handle a
// message.
//
// Returning ErrModuleMsgSkip indicates that handling a message was skipped.
//
// Any other returned errors causes the current WebSocket client to be
// disconnected.
HandleMsg(context.Context, hwebsocket.ResponseSender, hwebsocket.Msg) error
// Handles a client disconnection.
HandleDisconnect()
}
Module is the interface that describes a module that extends Hagall capabilities.
Click to show internal directories.
Click to hide internal directories.