Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Message ¶ added in v0.2.0
type Message struct { Dup bool QoS uint8 Retained bool Topic string Payload []byte PacketID packets.PacketID // v5 // The following fields are introduced in v5 specification. // These fields will not take effect when it represents a v3 publish packet. ContentType string CorrelationData []byte MessageExpiry uint32 PayloadFormat packets.PayloadFormat ResponseTopic string SubscriptionIdentifier []uint32 UserProperties []packets.UserProperty }
func MessageFromPublish ¶ added in v0.2.0
MessageFromPublish create the Message instance from publish packets
type Session ¶ added in v0.2.0
type Session struct { // ClientID represents the client id. ClientID string // Will is the will message of the client, can be nil if there is no will message. Will *Message // WillDelayInterval represents the Will Delay Interval in seconds WillDelayInterval uint32 // ConnectedAt is the session create time. ConnectedAt time.Time // ExpiryInterval represents the Session Expiry Interval in seconds ExpiryInterval uint32 }
Session represents a MQTT session.
type Subscription ¶ added in v0.2.0
type Subscription struct { // set to "" if it is a non-shared subscription. ShareName string // TopicFilter is the topic filter which does not include the share name. TopicFilter string // ID is the subscription identifier ID uint32 // QoS is the qos level of the Subscription. QoS packets.QoS // NoLocal is the No Local option. NoLocal bool // RetainAsPublished is the Retain As Published option. RetainAsPublished bool // RetainHandling the Retain Handling option. RetainHandling byte }
Subscription represents a subscription in gmqtt.
func (*Subscription) Copy ¶ added in v0.2.0
func (s *Subscription) Copy() *Subscription
Copy makes a copy of subscription.
func (*Subscription) GetFullTopicName ¶ added in v0.2.0
func (s *Subscription) GetFullTopicName() string
GetFullTopicName returns the full topic name of the subscription.
func (*Subscription) Validate ¶ added in v0.2.0
func (s *Subscription) Validate() error
Validate returns whether the subscription is valid. If you can ensure the subscription is valid then just skip the validation.
Directories ¶
Path | Synopsis |
---|---|
cmd
|
|
Package config is a generated GoMock package.
|
Package config is a generated GoMock package. |
examples
|
|
queue
Package queue is a generated GoMock package.
|
Package queue is a generated GoMock package. |
session
Package session is a generated GoMock package.
|
Package session is a generated GoMock package. |
subscription
Package subscription is a generated GoMock package.
|
Package subscription is a generated GoMock package. |
unack
Package unack is a generated GoMock package.
|
Package unack is a generated GoMock package. |
pkg
|
|
packets
Package packets is a generated GoMock package.
|
Package packets is a generated GoMock package. |
pidfile
Package pidfile provides structure and helper functions to create and remove PID file.
|
Package pidfile provides structure and helper functions to create and remove PID file. |
plugin
|
|
admin
Package admin is a reverse proxy.
|
Package admin is a reverse proxy. |
Package retained is a generated GoMock package.
|
Package retained is a generated GoMock package. |
Package gmqtt provides an MQTT v3.1.1 server library.
|
Package gmqtt provides an MQTT v3.1.1 server library. |
topicalias
|
|
Click to show internal directories.
Click to hide internal directories.