package
0.5.0
Repository: https://github.com/drmagice/gmqtt.git
Documentation: pkg.go.dev

# Functions

LoggerWithField release fields to a new logger.
New returns a gmqtt server instance with the given options.
NewMockClient creates a new mock instance.
NewMockClientService creates a new mock instance.
NewMockPersistence creates a new mock instance.
NewMockPlugin creates a new mock instance.
NewMockPublisher creates a new mock instance.
NewMockRetainedService creates a new mock instance.
NewMockServer creates a new mock instance.
NewMockStatsReader creates a new mock instance.
NewMockSubscriptionService creates a new mock instance.
NewMockTopicAliasManager creates a new mock instance.
No description provided by the author
No description provided by the author
No description provided by the author
WithConfig set the config of the server.
WithHook set hooks of the server.
No description provided by the author
WithPlugin set plugin(s) of the server.
WithRetainedStore set retained db of the server.
WithTCPListener set tcp listener(s) of the server.
WithWebsocketServer set websocket server(s) of the server.

# Constants

Client status.
Client status.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Variables

Error.
ErrInvalWsMsgType [MQTT-6.0.0-1].

# Structs

AuthOptions provides several options which controls how the server interacts with the client.
No description provided by the author
ReAuthResponse is the response of the OnAuth hook.
ClientOptions is the options which controls how the server interacts with the client.
ClientStats is the statistic information of one client.
ConnectionStats provides the statistics of client connections.
ConnectRequest represents a connect request made by a CONNECT packet.
No description provided by the author
No description provided by the author
GlobalStats is the collection of global statistics.
No description provided by the author
HookWrapper groups all hook wrappers function.
No description provided by the author
MessageStats represents the statistics of PUBLISH in, separated by QOS.
MockClient is a mock of Client interface.
MockClientMockRecorder is the mock recorder for MockClient.
MockClientService is a mock of ClientService interface.
MockClientServiceMockRecorder is the mock recorder for MockClientService.
MockPersistence is a mock of Persistence interface.
MockPersistenceMockRecorder is the mock recorder for MockPersistence.
MockPlugin is a mock of Plugin interface.
MockPluginMockRecorder is the mock recorder for MockPlugin.
MockPublisher is a mock of Publisher interface.
MockPublisherMockRecorder is the mock recorder for MockPublisher.
MockRetainedService is a mock of RetainedService interface.
MockRetainedServiceMockRecorder is the mock recorder for MockRetainedService.
MockServer is a mock of Server interface.
MockServerMockRecorder is the mock recorder for MockServer.
MockStatsReader is a mock of StatsReader interface.
MockStatsReaderMockRecorder is the mock recorder for MockStatsReader.
MockSubscriptionService is a mock of SubscriptionService interface.
MockSubscriptionServiceMockRecorder is the mock recorder for MockSubscriptionService.
MockTopicAliasManager is a mock of TopicAliasManager interface.
MockTopicAliasManagerMockRecorder is the mock recorder for MockTopicAliasManager.
MsgArrivedRequest is the input param for OnMsgArrived hook.
PacketBytes represents total bytes of each in type have been received or sent.
PacketStats represents the statistics of MQTT Packet.
SubscribeRequest represents the subscribe request made by a SUBSCRIBE packet.
UnsubscribeRequest is the input param for OnSubscribed hook.
WillMsgRequest is the input param for OnWillPublish hook.
WsServer is used to build websocket server.

# Interfaces

APIRegistrar is the registrar for all gRPC servers and HTTP servers.
Client represent a mqtt client.
ClientService provides the ability to query and close clients.
No description provided by the author
Plugin is the interface need to be implemented for every plugins.
Publisher provides the ability to Publish messages to the broker.
RetainedService providers the ability to query and add/delete retained messages.
Server interface represents a mqtt server instance.
StatsReader interface provides the ability to access the statistics of the server.
SubscriptionService providers the ability to query and add/delete subscriptions.
TopicAliasManager manage the topic alias for a V5 client.

# Type aliases

ClientIterateFn is the callback function used by ClientService.IterateClient Return false means to stop the iteration.
No description provided by the author
HTTPHandler is the http handler defined by gRPC-gateway.
No description provided by the author
NewPlugin is the constructor of a plugin.
No description provided by the author
OnAccept will be called after a new connection established in TCP server.
No description provided by the author
No description provided by the author
No description provided by the author
OnBasicAuth will be called when receive v311 connect packet or v5 connect packet with empty auth method property.
No description provided by the author
OnClosed will be called after the tcp connection of the client has been closed.
No description provided by the author
OnConnected will be called when a mqtt client connect successfully.
No description provided by the author
OnDelivered will be called when publishing a message to a client.
No description provided by the author
OnEnhancedAuth will be called when receive v5 connect packet with auth method property.
No description provided by the author
OnMsgArrived will be called when receive a Publish packets.It provides the ability to modify the message before topic match process.
No description provided by the author
OnMsgDropped will be called after the Msg dropped.
No description provided by the author
No description provided by the author
No description provided by the author
OnSessionCreated will be called when new session created.
No description provided by the author
OnSessionResumed will be called when session resumed.
No description provided by the author
OnSessionTerminated will be called when session has been terminated.
No description provided by the author
OnStop will be called on server.Stop().
No description provided by the author
OnSubscribe will be called when receive a SUBSCRIBE packet.
OnSubscribed will be called after the topic subscribe successfully.
No description provided by the author
No description provided by the author
OnUnsubscribe will be called when receive a UNSUBSCRIBE packet.
OnUnsubscribed will be called after the topic has been unsubscribed.
No description provided by the author
No description provided by the author
OnWillPublish will be called before the client with the given clientID sending the will message.
OnWillPublished will be called after the will message has been sent by the client.
No description provided by the author
No description provided by the author
No description provided by the author
PacketCount represents total number of each in type have been received or sent.
No description provided by the author