Documentation ¶
Index ¶
- type Hook
- func (h *Hook) ID() string
- func (h *Hook) Init(config any) error
- func (h *Hook) OnClientExpired(cl *mqtt.Client)
- func (h *Hook) OnLWTSent(cl *mqtt.Client, pk packets.Packet)
- func (h *Hook) OnPacketRead(cl *mqtt.Client, pk packets.Packet) (packets.Packet, error)
- func (h *Hook) OnPacketSent(cl *mqtt.Client, pk packets.Packet, b []byte)
- func (h *Hook) OnQosComplete(cl *mqtt.Client, pk packets.Packet)
- func (h *Hook) OnQosDropped(cl *mqtt.Client, pk packets.Packet)
- func (h *Hook) OnQosPublish(cl *mqtt.Client, pk packets.Packet, sent int64, resends int)
- func (h *Hook) OnRetainMessage(cl *mqtt.Client, pk packets.Packet, r int64)
- func (h *Hook) OnRetainedExpired(filter string)
- func (h *Hook) OnStarted()
- func (h *Hook) OnStopped()
- func (h *Hook) Provides(b byte) bool
- func (h *Hook) SetOpts(l *slog.Logger, opts *mqtt.HookOptions)
- func (h *Hook) Stop() error
- func (h *Hook) StoredClients() (v []storage.Client, err error)
- func (h *Hook) StoredInflightMessages() (v []storage.Message, err error)
- func (h *Hook) StoredRetainedMessages() (v []storage.Message, err error)
- func (h *Hook) StoredSubscriptions() (v []storage.Subscription, err error)
- func (h *Hook) StoredSysInfo() (v storage.SystemInfo, err error)
- type Options
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Hook ¶
Hook is a debugging hook which logs additional low-level information from the server.
func (*Hook) OnClientExpired ¶
OnClientExpired is called when the server clears an expired client.
func (*Hook) OnLWTSent ¶
OnLWTSent is called when a Will Message has been issued from a disconnecting client.
func (*Hook) OnPacketRead ¶
OnPacketRead is called when a new packet is received from a client.
func (*Hook) OnPacketSent ¶
OnPacketSent is called when a packet is sent to a client.
func (*Hook) OnQosComplete ¶
OnQosComplete is called when the Qos flow for a message has been completed.
func (*Hook) OnQosDropped ¶
OnQosDropped is called the Qos flow for a message expires.
func (*Hook) OnQosPublish ¶
OnQosPublish is called when a publish packet with Qos is issued to a subscriber.
func (*Hook) OnRetainMessage ¶
OnRetainMessage is called when a published message is retained (or retain deleted/modified).
func (*Hook) OnRetainedExpired ¶
OnRetainedExpired is called when the server clears expired retained messages.
func (*Hook) SetOpts ¶
func (h *Hook) SetOpts(l *slog.Logger, opts *mqtt.HookOptions)
SetOpts is called when the hook receives inheritable server parameters.
func (*Hook) StoredClients ¶
StoredClients is called when the server restores clients from a store.
func (*Hook) StoredInflightMessages ¶
StoredInflightMessages is called when the server restores inflight messages from a store.
func (*Hook) StoredRetainedMessages ¶
StoredRetainedMessages is called when the server restores retained messages from a store.
func (*Hook) StoredSubscriptions ¶
func (h *Hook) StoredSubscriptions() (v []storage.Subscription, err error)
StoredSubscriptions is called when the server restores subscriptions from a store.
func (*Hook) StoredSysInfo ¶
func (h *Hook) StoredSysInfo() (v storage.SystemInfo, err error)
StoredSysInfo is called when the server restores system info from a store.
type Options ¶
type Options struct { ShowPacketData bool // include decoded packet data (default false) ShowPings bool // show ping requests and responses (default false) ShowPasswords bool // show connecting user passwords (default false) }
Options contains configuration settings for the debug output.