Documentation ¶
Index ¶
- type Client
- type ClientFactory
- type ConnectionState
- type MQTTConsumer
- func (m *MQTTConsumer) Description() string
- func (m *MQTTConsumer) Gather(acc telegraf.Accumulator) error
- func (m *MQTTConsumer) Init() error
- func (m *MQTTConsumer) SampleConfig() string
- func (m *MQTTConsumer) SetParser(parser parsers.Parser)
- func (m *MQTTConsumer) Start(acc telegraf.Accumulator) error
- func (m *MQTTConsumer) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientFactory ¶
type ClientFactory func(o *mqtt.ClientOptions) Client
type ConnectionState ¶
type ConnectionState int
const ( Disconnected ConnectionState = iota Connecting Connected )
type MQTTConsumer ¶
type MQTTConsumer struct { Servers []string `toml:"servers"` Topics []string `toml:"topics"` TopicTag *string `toml:"topic_tag"` Username string `toml:"username"` Password string `toml:"password"` QoS int `toml:"qos"` ConnectionTimeout internal.Duration `toml:"connection_timeout"` MaxUndeliveredMessages int `toml:"max_undelivered_messages"` // Legacy metric buffer support; deprecated in v0.10.3 MetricBuffer int PersistentSession bool ClientID string `toml:"client_id"` tls.ClientConfig Log telegraf.Logger // contains filtered or unexported fields }
func New ¶
func New(factory ClientFactory) *MQTTConsumer
func (*MQTTConsumer) Description ¶
func (m *MQTTConsumer) Description() string
func (*MQTTConsumer) Gather ¶
func (m *MQTTConsumer) Gather(acc telegraf.Accumulator) error
func (*MQTTConsumer) Init ¶
func (m *MQTTConsumer) Init() error
func (*MQTTConsumer) SampleConfig ¶
func (m *MQTTConsumer) SampleConfig() string
func (*MQTTConsumer) SetParser ¶
func (m *MQTTConsumer) SetParser(parser parsers.Parser)
func (*MQTTConsumer) Start ¶
func (m *MQTTConsumer) Start(acc telegraf.Accumulator) error
func (*MQTTConsumer) Stop ¶
func (m *MQTTConsumer) Stop()
Click to show internal directories.
Click to hide internal directories.