sinks

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 16, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudPubSubSink added in v0.2.0

type CloudPubSubSink struct {
	// contains filtered or unexported fields
}

CloudPubSubSink publishes measurements to Google Cloud Pub/Sub.

func NewCloudPubSubSink added in v0.2.0

func NewCloudPubSubSink(config *config.CloudPubSubSink) (*CloudPubSubSink, error)

NewCloudPubSubSink creates new CloudPubSubSink.

func (*CloudPubSubSink) Publish added in v0.2.0

func (s *CloudPubSubSink) Publish(m *api.Measurement)

Publish is used to push measurement for publication.

type MQTTSink

type MQTTSink struct {
	// contains filtered or unexported fields
}

MQTTSink publishes measurements to MQTT.

func NewMQTTSink

func NewMQTTSink(c *config.MQTTSink) (*MQTTSink, error)

NewMQTTSink creates new MQTTSink.

func (*MQTTSink) Publish

func (s *MQTTSink) Publish(m *api.Measurement)

Publish is used to push measurement for publication.

type Sink

type Sink interface {
	Publish(*api.Measurement)
}

Sink represents an object with Publish method for publishing api.Measurement.

func NewSink

func NewSink(sinkConfig config.Sink) (Sink, error)

NewSink creates a new Sink objects based on the config.Sink configuration.

type StdoutSink

type StdoutSink struct {
	// contains filtered or unexported fields
}

StdoutSink publishes measurements on standard output.

func NewStdoutSink

func NewStdoutSink(config *config.StdoutSink) (*StdoutSink, error)

NewStdoutSink creates new StdoutSink.

func (*StdoutSink) Publish

func (s *StdoutSink) Publish(m *api.Measurement)

Publish is used to push measurement for publication.

Jump to

Keyboard shortcuts

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