Documentation ¶
Index ¶
- Variables
- type Broker
- type Client
- func (c *Client) Cid() string
- func (c *Client) Publish(payload interface{}) error
- func (c *Client) Subscribe(cb mqtt.MessageHandler) error
- func (c *Client) Unsubscribe() error
- func (c *Client) WithQoS(qos QOS) *Client
- func (c *Client) WithRetain(retain bool) *Client
- func (c *Client) WithTimeout(timeout time.Duration) *Client
- func (c *Client) WithTopic(topic string) *Client
- type QOS
- func (v QOS) ConstValues() []enum.IntStringerEnum
- func (v QOS) Int() int
- func (v QOS) Label() string
- func (v QOS) MarshalText() ([]byte, error)
- func (v *QOS) Scan(src interface{}) error
- func (v QOS) String() string
- func (v QOS) TypeName() string
- func (v *QOS) UnmarshalText(data []byte) error
- func (v QOS) Value() (driver.Value, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var InvalidQOS = errors.New("invalid QOS type")
Functions ¶
This section is empty.
Types ¶
type Broker ¶
type Broker struct { Server types.Endpoint Retry retry.Retry Timeout types.Duration Keepalive types.Duration RetainPublish bool QoS QOS // contains filtered or unexported fields }
func (*Broker) ClientWithOptions ¶
func (*Broker) SetDefault ¶
func (b *Broker) SetDefault()
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Unsubscribe ¶ added in v1.0.0
func (*Client) WithRetain ¶
type QOS ¶
type QOS int8
func ParseQOSFromLabel ¶
func ParseQOSFromString ¶
func (QOS) ConstValues ¶
func (v QOS) ConstValues() []enum.IntStringerEnum
func (QOS) MarshalText ¶
func (*QOS) UnmarshalText ¶
Click to show internal directories.
Click to hide internal directories.