modules

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: May 9, 2024 License: MIT Imports: 3 Imported by: 0

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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