notification

package
v0.0.0-...-35b844d Latest Latest
Warning

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

Go to latest
Published: Nov 20, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var WebsocketLogger = logrus.New().WithField("scope", "websocket")

Functions

This section is empty.

Types

type NotificationConnection

type NotificationConnection struct {
	Id         string
	Username   string
	Connection *websocket.Conn
	Logger     *logrus.Entry
	// contains filtered or unexported fields
}

type NotificationManager

type NotificationManager struct {
	Conns map[string]*NotificationConnection
	sync.Mutex
}

func NewNotificationManager

func NewNotificationManager() *NotificationManager

func (*NotificationManager) SendJSONToAll

func (m *NotificationManager) SendJSONToAll(data interface{})

func (*NotificationManager) SendJSONToUser

func (m *NotificationManager) SendJSONToUser(data interface{}, username string)

type NotificationModule

type NotificationModule struct {
	NotificationSocketHandler haruka.RequestHandler
	Manager                   *NotificationManager
}

func (*NotificationModule) InitModule

func (m *NotificationModule) InitModule() error

Jump to

Keyboard shortcuts

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