Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MqttPayloadToBytes ¶
func NewErrorToken ¶
func NewNamespaceClientOptions ¶ added in v1.1.0
func NewNamespaceClientOptions(clientId string) *mqtt.ClientOptions
func SetFactory ¶
func SetFactory(fac Factory)
Types ¶
type Factory ¶
type Factory func(options config.MqttClientConfig, onConnect func(mqtt.Client)) (mqtt.Client, error)
var ClientFactory Factory
type PublishingConfig ¶
type PublishingConfig struct { SubscriptionConfig // contains filtered or unexported fields }
func NewTopicConfig ¶
func NewTopicConfig(topic string) PublishingConfig
func (*PublishingConfig) Publish ¶
func (a *PublishingConfig) Publish(target mqtt.Client, payload interface{}) mqtt.Token
func (*PublishingConfig) RetainFlag ¶
func (a *PublishingConfig) RetainFlag() bool
func (*PublishingConfig) WithRetainFlag ¶
func (a *PublishingConfig) WithRetainFlag(retain bool)
type Subscription ¶
type Subscription interface { PayloadFactory() interface{} SubscriptionHandler(payload interface{}, err error) }
type SubscriptionConfig ¶
type SubscriptionConfig struct {
// contains filtered or unexported fields
}
func (*SubscriptionConfig) QualityOfService ¶
func (a *SubscriptionConfig) QualityOfService() QoS
func (*SubscriptionConfig) Subscribe ¶
func (a *SubscriptionConfig) Subscribe(target mqtt.Client, subscription Subscription) mqtt.Token
func (*SubscriptionConfig) Topic ¶
func (a *SubscriptionConfig) Topic() string
func (*SubscriptionConfig) WithQualityOfService ¶
func (a *SubscriptionConfig) WithQualityOfService(qos QoS)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.