Documentation ¶
Index ¶
- Constants
- Variables
- func EnableGMQTestMode(host string)
- func EnableLibMQTTTestMode(host string)
- func EnablePahoTestMode(host string)
- type Client
- func GetGMQClient(host, username, password string, errorHandler func(Client, error)) (client Client)
- func GetGlueClient(host, username, password string, errorHandler func(Client, error)) (client Client)
- func GetLibMQTTClient(host, username, password string, errorHandler func(Client, error)) (client Client)
- func GetMQTTClient(host, username, password string) (client Client)
- func GetPahoClient(host, username, password string, errorHandler func(Client, error)) (client Client)
- type GMQClient
- func (c *GMQClient) Connect() error
- func (c *GMQClient) Disconnect() error
- func (c *GMQClient) Publish(topic string, qos byte, retained bool, payload interface{}, quiet ...bool) error
- func (c *GMQClient) Subscribe(topic string, qos byte, callback func(message Message)) error
- func (c *GMQClient) Unsubscribe(topic string) error
- type GlueClient
- func (c *GlueClient) Connect() error
- func (c *GlueClient) Disconnect() error
- func (c *GlueClient) Publish(topic string, qos byte, retained bool, payload interface{}, quiet ...bool) error
- func (c *GlueClient) Subscribe(topic string, qos byte, callback func(message Message)) error
- func (c *GlueClient) Unsubscribe(topic string) error
- type LibMQTTClient
- func (c *LibMQTTClient) Connect() error
- func (c *LibMQTTClient) Disconnect() error
- func (c *LibMQTTClient) Publish(topic string, qos byte, retained bool, payload interface{}, quiet ...bool) error
- func (c *LibMQTTClient) Subscribe(topic string, qos byte, callback func(message Message)) error
- func (c *LibMQTTClient) Unsubscribe(topic string) error
- type Message
- type PahoClient
- func (c *PahoClient) Connect() error
- func (c *PahoClient) Disconnect() error
- func (c *PahoClient) Publish(topic string, qos byte, retained bool, payload interface{}, quiet ...bool) error
- func (c *PahoClient) Subscribe(topic string, qos byte, callback func(message Message)) error
- func (c *PahoClient) Unsubscribe(topic string) error
- type PersistentClient
- func (c *PersistentClient) Connect() error
- func (c *PersistentClient) Disconnect() error
- func (c *PersistentClient) HandleError(client Client, err error)
- func (c *PersistentClient) Publish(topic string, qos byte, retained bool, payload interface{}, quiet ...bool) error
- func (c *PersistentClient) SetClient(client Client)
- func (c *PersistentClient) Subscribe(topic string, qos byte, callback func(message Message)) error
- func (c *PersistentClient) Unsubscribe(topic string) error
- type Subscription
Constants ¶
View Source
const ( AtMostOnce = byte(0) AtLeastOnce = byte(1) ExactlyOnce = byte(2) )
Variables ¶
View Source
var GMQTestHost string
View Source
var GMQTestMode = false
View Source
var LibMQTTTestHost string
View Source
var LibMQTTTestMode = false
View Source
var PahoTestHost string
View Source
var PahoTestMode = false
Functions ¶
func EnableGMQTestMode ¶
func EnableGMQTestMode(host string)
func EnableLibMQTTTestMode ¶
func EnableLibMQTTTestMode(host string)
func EnablePahoTestMode ¶
func EnablePahoTestMode(host string)
Types ¶
type Client ¶
type Client interface { Connect() error Publish(topic string, qos byte, retained bool, payload interface{}, quiet ...bool) error Subscribe(topic string, qos byte, callback func(message Message)) error Unsubscribe(topic string) error Disconnect() error }
func GetGMQClient ¶
func GetGlueClient ¶
func GetLibMQTTClient ¶
func GetMQTTClient ¶
type GMQClient ¶
type GMQClient struct {
// contains filtered or unexported fields
}
func NewGMQClient ¶
func (*GMQClient) Disconnect ¶
func (*GMQClient) Unsubscribe ¶
type GlueClient ¶
type GlueClient struct {
// contains filtered or unexported fields
}
func NewGlueClient ¶
func NewGlueClient(host, username, password string, errorHandler func(Client, error)) (*GlueClient, error)
func (*GlueClient) Connect ¶
func (c *GlueClient) Connect() error
func (*GlueClient) Disconnect ¶
func (c *GlueClient) Disconnect() error
func (*GlueClient) Subscribe ¶
func (c *GlueClient) Subscribe(topic string, qos byte, callback func(message Message)) error
func (*GlueClient) Unsubscribe ¶
func (c *GlueClient) Unsubscribe(topic string) error
type LibMQTTClient ¶
type LibMQTTClient struct {
// contains filtered or unexported fields
}
func NewLibMQTTClient ¶
func NewLibMQTTClient(host, username, password string, errorHandler func(Client, error)) (c *LibMQTTClient)
func (*LibMQTTClient) Connect ¶
func (c *LibMQTTClient) Connect() error
func (*LibMQTTClient) Disconnect ¶
func (c *LibMQTTClient) Disconnect() error
func (*LibMQTTClient) Subscribe ¶
func (c *LibMQTTClient) Subscribe(topic string, qos byte, callback func(message Message)) error
func (*LibMQTTClient) Unsubscribe ¶
func (c *LibMQTTClient) Unsubscribe(topic string) error
type Message ¶
func (*Message) MostlyEqual ¶
type PahoClient ¶
type PahoClient struct {
// contains filtered or unexported fields
}
func NewPahoClient ¶
func NewPahoClient(host, username, password string, errorHandler func(Client, error)) (c *PahoClient)
func (*PahoClient) Connect ¶
func (c *PahoClient) Connect() error
func (*PahoClient) Disconnect ¶
func (c *PahoClient) Disconnect() error
func (*PahoClient) Subscribe ¶
func (c *PahoClient) Subscribe(topic string, qos byte, callback func(message Message)) error
func (*PahoClient) Unsubscribe ¶
func (c *PahoClient) Unsubscribe(topic string) error
type PersistentClient ¶
type PersistentClient struct {
// contains filtered or unexported fields
}
func NewPersistentClient ¶
func NewPersistentClient() *PersistentClient
func (*PersistentClient) Connect ¶
func (c *PersistentClient) Connect() error
func (*PersistentClient) Disconnect ¶
func (c *PersistentClient) Disconnect() error
func (*PersistentClient) HandleError ¶
func (c *PersistentClient) HandleError(client Client, err error)
func (*PersistentClient) SetClient ¶
func (c *PersistentClient) SetClient(client Client)
func (*PersistentClient) Subscribe ¶
func (c *PersistentClient) Subscribe(topic string, qos byte, callback func(message Message)) error
func (*PersistentClient) Unsubscribe ¶
func (c *PersistentClient) Unsubscribe(topic string) error
type Subscription ¶
type Subscription struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.