dds_producer

package
v0.2.1-dds Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2021 License: MIT Imports: 5 Imported by: 0

README

DDS Output Plugin with the Line Protocol Data Model

dds_producer_lp plugin writes DDS data in a data model based on the Line Protocol format. This plugin creates a DDS writer with a DDS topic named Telegraf. The data type used by the reader is described in line_protocol.idl.

Configuration:
[[inputs.dds_producer_lp]]
# DDS Domain ID configuration
domain_id = "0"

Documentation

Index

Constants

View Source
const (
	FIELD_DOUBLE = 0
	FIELD_INT    = 1
	FIELD_UINT   = 2
	FIELD_STRING = 3
	FIELD_BOOL   = 4
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DDSProducer

type DDSProducer struct {
	// DDS Domain ID Configuration
	DomainId string `toml:"domain_id"`
	// contains filtered or unexported fields
}

func (*DDSProducer) Close

func (d *DDSProducer) Close() error

func (*DDSProducer) Connect

func (d *DDSProducer) Connect() (err error)

func (*DDSProducer) Description

func (d *DDSProducer) Description() string

func (*DDSProducer) SampleConfig

func (d *DDSProducer) SampleConfig() string

func (*DDSProducer) SetSerializer

func (d *DDSProducer) SetSerializer(serializer serializers.Serializer)

func (*DDSProducer) Write

func (d *DDSProducer) Write(metrics []telegraf.Metric) (err error)

type Field

type Field struct {
	Key   string          `json:"key"`
	Kind  int             `json:"kind"`
	Value FieldValueUnion `json:"value"`
}

type FieldValueUnion

type FieldValueUnion struct {
	D *float64 `json:"d,omitempty"`
	I *int64   `json:"i,omitempty"`
	U *uint64  `json:"u,omitempty"`
	S *string  `json:"s,omitempty"`
	B *bool    `json:"b,omitempty"`
}

type Metric

type Metric struct {
	Name      string  `json:"name"`
	Tags      []Tag   `json:"tags"`
	Fields    []Field `json:"fields"`
	Timestamp int64   `json:"timestamp"`
}

type Tag

type Tag struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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