Documentation ¶
Index ¶
- Constants
- Variables
- type MQTT
- func (m *MQTT) Close(_ context.Context) error
- func (m *MQTT) DisplayError(msg *records.ErrorRecord) error
- func (m *MQTT) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error
- func (m *MQTT) Dynamic(ctx context.Context, dynamicOpts *opts.DynamicOptions, ...) error
- func (m *MQTT) Name() string
- func (m *MQTT) Read(ctx context.Context, readOpts *opts.ReadOptions, ...) error
- func (m *MQTT) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, ...) error
- func (m *MQTT) Test(_ context.Context) error
- func (m *MQTT) Write(ctx context.Context, writeOpts *opts.WriteOptions, ...) error
Constants ¶
View Source
const ( DefaultClientId = "plumber" BackendName = "mqtt" )
Variables ¶
View Source
var ( ErrInvalidAddress = errors.New("URI scheme must be ssl:// or tcp://") ErrMissingTLSKey = errors.New("--tls-client-key-file cannot be blank if using ssl") ErrMissingTlsCert = errors.New("--tls-client-cert-file cannot be blank if using ssl") ErrMissingTLSCA = errors.New("--tls-ca-file cannot be blank if using ssl") ErrWriteTimeout = errors.New("write timeout must be greater than 0") ErrEmptyTopic = errors.New("Topic cannot be empty") )
Functions ¶
This section is empty.
Types ¶
type MQTT ¶
type MQTT struct {
// contains filtered or unexported fields
}
func (*MQTT) DisplayError ¶ added in v1.0.0
func (m *MQTT) DisplayError(msg *records.ErrorRecord) error
DisplayError will parse an Error record and print (pretty) output to STDOUT
func (*MQTT) DisplayMessage ¶ added in v1.0.0
func (m *MQTT) DisplayMessage(cliOpts *opts.CLIOptions, msg *records.ReadRecord) error
DisplayMessage will parse a Read record and print (pretty) output to STDOUT
func (*MQTT) Read ¶
func (m *MQTT) Read(ctx context.Context, readOpts *opts.ReadOptions, resultsChan chan *records.ReadRecord, errorChan chan *records.ErrorRecord) error
func (*MQTT) Relay ¶ added in v1.0.0
func (m *MQTT) Relay(ctx context.Context, relayOpts *opts.RelayOptions, relayCh chan interface{}, errorCh chan *records.ErrorRecord) error
func (*MQTT) Write ¶
func (m *MQTT) Write(ctx context.Context, writeOpts *opts.WriteOptions, errorCh chan *records.ErrorRecord, messages ...*records.WriteRecord) error
Click to show internal directories.
Click to hide internal directories.