mqtt

package
v0.0.28 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ACLHook

type ACLHook struct {
	mqtt.HookBase
}

func (*ACLHook) ID

func (h *ACLHook) ID() string

func (*ACLHook) OnACLCheck

func (h *ACLHook) OnACLCheck(cl *mqtt.Client, topic string, write bool) bool

func (*ACLHook) Provides

func (h *ACLHook) Provides(b byte) bool

type AuthHook

type AuthHook struct {
	mqtt.HookBase
	// contains filtered or unexported fields
}

func (*AuthHook) ID

func (h *AuthHook) ID() string

func (*AuthHook) OnConnect

func (h *AuthHook) OnConnect(cl *mqtt.Client, pk packets.Packet) error

func (*AuthHook) OnConnectAuthenticate

func (h *AuthHook) OnConnectAuthenticate(cl *mqtt.Client, pk packets.Packet) bool

func (*AuthHook) OnDisconnect

func (h *AuthHook) OnDisconnect(cl *mqtt.Client, err error, expire bool)

func (*AuthHook) OnPublish

func (h *AuthHook) OnPublish(cl *mqtt.Client, pk packets.Packet) (packets.Packet, error)

func (*AuthHook) OnSubscribe

func (h *AuthHook) OnSubscribe(cl *mqtt.Client, pk packets.Packet) packets.Packet

func (*AuthHook) OnUnsubscribe

func (h *AuthHook) OnUnsubscribe(cl *mqtt.Client, pk packets.Packet) packets.Packet

func (*AuthHook) Provides

func (h *AuthHook) Provides(b byte) bool

type Broker

type Broker struct {
	// contains filtered or unexported fields
}

func NewBroker

func NewBroker(port string, tlsConfig *tls.Config, validateToken func(token string) (string, error), iceServers []interface{}) *Broker

func (*Broker) Start

func (b *Broker) Start() error

func (*Broker) Stop

func (b *Broker) Stop() error

type ConnectionHook

type ConnectionHook struct {
	mqtt.HookBase
	// contains filtered or unexported fields
}

func (*ConnectionHook) ID

func (h *ConnectionHook) ID() string

func (*ConnectionHook) OnDisconnect

func (h *ConnectionHook) OnDisconnect(cl *mqtt.Client, err error, expire bool)

func (*ConnectionHook) OnPacketRead

func (h *ConnectionHook) OnPacketRead(cl *mqtt.Client, pk packets.Packet) (packets.Packet, error)

func (*ConnectionHook) Provides

func (h *ConnectionHook) Provides(b byte) bool

type Participant

type Participant struct {
	// contains filtered or unexported fields
}

type RoomManager

type RoomManager struct {
	// contains filtered or unexported fields
}

func NewRoomManager

func NewRoomManager() *RoomManager

func (*RoomManager) AddParticipant

func (rm *RoomManager) AddParticipant(roomName, clientID, userID string) bool

func (*RoomManager) FindActiveRoom

func (rm *RoomManager) FindActiveRoom(userID string) string

func (*RoomManager) GetOrCreateRoom

func (rm *RoomManager) GetOrCreateRoom(roomName, userID, deviceID string) *ScreenshareRoom

func (*RoomManager) GetPeers

func (rm *RoomManager) GetPeers(roomName, senderClientID string) []Participant

func (*RoomManager) RemoveParticipant

func (rm *RoomManager) RemoveParticipant(clientID string) (roomName, creatorUserID, creatorDeviceID string, wasLastParticipant bool)

func (*RoomManager) RoomExists

func (rm *RoomManager) RoomExists(roomName string) bool

type ScreenshareRoom

type ScreenshareRoom struct {
	// contains filtered or unexported fields
}

type SignalingMessage

type SignalingMessage struct {
	Type        string                 `json:"type"`
	Room        string                 `json:"room"`
	RoomId      string                 `json:"roomId"`
	UserData    string                 `json:"userdata"`
	AccessCodes []string               `json:"accessCodes"`
	ClientId    string                 `json:"clientId"`
	Payload     map[string]interface{} `json:"payload"`
	IceServers  map[string]interface{} `json:"iceServers"`
}

Jump to

Keyboard shortcuts

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