mqtt

package
v0.194.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 26, 2023 License: MIT Imports: 18 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DefaultConnectMQTTTimeout = 1 * time.Second
	DefaultClientID           = "flux-mqtt"
)
View Source
const (
	ToMQTTKind          = "toMQTT"
	DefaultNameColLabel = "_measurement"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CommonMQTTOpSpec added in v0.133.0

type CommonMQTTOpSpec struct {
	Broker      string        `json:"broker"`
	ClientID    string        `json:"clientid"`
	Username    string        `json:"username"`
	Password    string        `json:"password"`
	QoS         int64         `json:"qos"`
	Retain      bool          `json:"retain"`
	Timeout     time.Duration `json:"timeout"`
	NoKeepAlive bool          `json:"noKeepAlive"`
}

func (*CommonMQTTOpSpec) ReadArgs added in v0.133.0

func (o *CommonMQTTOpSpec) ReadArgs(args flux.Arguments) error

type ToMQTTOpSpec

type ToMQTTOpSpec struct {
	CommonMQTTOpSpec
	Topic        string   `json:"topic"` // optional in this spec
	Name         string   `json:"name"`
	NameColumn   string   `json:"nameColumn"` // either name or name_column must be set, if none is set try to use the "_measurement" column.
	TimeColumn   string   `json:"timeColumn"`
	TagColumns   []string `json:"tagColumns"`
	ValueColumns []string `json:"valueColumns"`
}

func (ToMQTTOpSpec) Kind

func (*ToMQTTOpSpec) ReadArgs

func (o *ToMQTTOpSpec) ReadArgs(args flux.Arguments) error

ReadArgs loads a flux.Arguments into ToMQTTOpSpec. It sets several default values. If the time_column isn't set, it defaults to execute.TimeColLabel. If the value_column isn't set it defaults to a []string{execute.DefaultValueColLabel}.

func (*ToMQTTOpSpec) UnmarshalJSON

func (o *ToMQTTOpSpec) UnmarshalJSON(b []byte) (err error)

UnmarshalJSON unmarshals and validates toMQTTOpSpec into JSON.

type ToMQTTProcedureSpec

type ToMQTTProcedureSpec struct {
	plan.DefaultCost
	Spec *ToMQTTOpSpec
}

func (*ToMQTTProcedureSpec) Copy

func (*ToMQTTProcedureSpec) Kind

type ToMQTTTransformation

type ToMQTTTransformation struct {
	execute.ExecutionNode
	// contains filtered or unexported fields
}

func (*ToMQTTTransformation) Finish

func (t *ToMQTTTransformation) Finish(id execute.DatasetID, err error)

func (*ToMQTTTransformation) Process

func (t *ToMQTTTransformation) Process(id execute.DatasetID, tbl flux.Table) error

func (*ToMQTTTransformation) RetractTable

func (t *ToMQTTTransformation) RetractTable(id execute.DatasetID, key flux.GroupKey) error

func (*ToMQTTTransformation) UpdateProcessingTime

func (t *ToMQTTTransformation) UpdateProcessingTime(id execute.DatasetID, pt execute.Time) error

func (*ToMQTTTransformation) UpdateWatermark

func (t *ToMQTTTransformation) UpdateWatermark(id execute.DatasetID, pt execute.Time) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL