Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Version = "unreleased" Quiet = false Verbose = false Config ConfigType )
Functions ¶
func ConnectInfluxDB ¶ added in v0.2.0
func ConnectInfluxDB(config *InfluxDBConfig) (influxdb2.Client, error)
func WriteEntry ¶ added in v0.2.0
Types ¶
type ConfigType ¶
type ConfigType struct { HealthCheckListener *string `yaml:"health_check,omitempty"` Verbose *bool `yaml:"verbose,omitempty"` MQTT *MQTTConfig `yaml:"mqtt"` InfluxDB *InfluxDBConfig `yaml:"influxdb,omitempty"` Metrics []MetricsType `yaml:"metrics"` }
type InfluxDBConfig ¶ added in v0.2.0
type MQTTConfig ¶
type MQTTConfig struct { Broker string `yaml:"broker"` Port string `yaml:"port"` Protocol string `yaml:"protocol"` TopicPaths []string `yaml:"topic_paths"` DeviceIDPattern string `yaml:"device_id_regex"` User string `yaml:"user"` Password string `yaml:"password"` ClientID string `yaml:"client_id"` QoS byte `yaml:"qos"` MetricPerTopicPattern string `yaml:"metric_per_topic_regex"` }
type MetricsType ¶ added in v0.2.0
type MetricsType struct { MqttName string `yaml:"mqtt_name"` Name string `yaml:"name,omitempty"` Unit string `yaml:"unit,omitempty"` Type string `yaml:"type,omitempty"` ConstantTags map[string]string `yaml:"const_tags"` StringValueMapping *StringValueMappingConfig `yaml:"string_value_mapping,omitempty"` }
Click to show internal directories.
Click to hide internal directories.