Documentation ¶
Overview ¶
Package contains provides diferent targets Indoor Climate date can be send to.
Index ¶
- func NewLogTarget(logger log.Logger) indoorclimate.Publisher
- func NewS3Target(conf config.Config) (indoorclimate.Publisher, error)
- func NewSnsTarget(conf config.Config) indoorclimate.Publisher
- func NewSqsTarget(conf config.Config, logger log.Logger) indoorclimate.Publisher
- func NewStdoutTarget() indoorclimate.Publisher
- func NewTimestreamTarget(conf config.Config, logger log.Logger) indoorclimate.Publisher
- type LogTarget
- type S3Target
- type SnsTarget
- type SqsTarget
- type StdoutTarget
- type TimestreamTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewLogTarget ¶
func NewLogTarget(logger log.Logger) indoorclimate.Publisher
NewLogTarget create a new log publisher.
func NewS3Target ¶ added in v1.0.12
func NewS3Target(conf config.Config) (indoorclimate.Publisher, error)
NewS3Target create a new S3 uploader.
func NewSnsTarget ¶ added in v1.0.8
func NewSnsTarget(conf config.Config) indoorclimate.Publisher
NewSnsTarget creates a new publisher for AWS SNS.
func NewSqsTarget ¶
NewSqsTarget creates a new publisher for AWS SQS.
func NewStdoutTarget ¶ added in v1.0.1
func NewStdoutTarget() indoorclimate.Publisher
NewStdoutTarget create a new publisher writing to stdout using fmt.
func NewTimestreamTarget ¶ added in v1.0.2
NewTimestreamTarget returns a new target which writes measurements to AWS Timestream.
Types ¶
type LogTarget ¶
type LogTarget struct {
// contains filtered or unexported fields
}
LogTarget writes given indoor climate data to an internal logger
func (*LogTarget) SendMeasurement ¶
func (logPublisher *LogTarget) SendMeasurement(measurement indoorclimate.IndoorClimateMeasurement) error
SendMeasurement will write log message with level Info for passed indoor climate measurement.
type S3Target ¶ added in v1.0.12
type S3Target struct {
// contains filtered or unexported fields
}
S3Target uploads passed indoor climate measurement to a AWS S3 bucket.
func (*S3Target) SendMeasurement ¶ added in v1.0.12
func (target *S3Target) SendMeasurement(measurement indoorclimate.IndoorClimateMeasurement) error
SendMeasurement will start to transfer passed measurement to a target.
type SnsTarget ¶ added in v1.0.8
type SnsTarget struct {
// contains filtered or unexported fields
}
SnsTarget sends passed indoor climate data to a AWS SNS topic.
func (*SnsTarget) SendMeasurement ¶ added in v1.0.8
func (target *SnsTarget) SendMeasurement(measurement indoorclimate.IndoorClimateMeasurement) error
SendMeasurement will start to transfer passed measurement to a target.
type SqsTarget ¶
type SqsTarget struct {
// contains filtered or unexported fields
}
SqsTarget sends passed indoor climate data to a AWS SQS queue.
func (*SqsTarget) SendMeasurement ¶
func (target *SqsTarget) SendMeasurement(measurement indoorclimate.IndoorClimateMeasurement) error
SendMeasurement will start to transfer passed measurement to a target.
type StdoutTarget ¶
type StdoutTarget struct { }
StdoutTarget writes given indoor climate data to Stdout unsing fmt package.
func (*StdoutTarget) SendMeasurement ¶ added in v1.0.1
func (logPublisher *StdoutTarget) SendMeasurement(measurement indoorclimate.IndoorClimateMeasurement) error
SendMeasurement will write passed indoor climate data to stdout.
type TimestreamTarget ¶
type TimestreamTarget struct {
// contains filtered or unexported fields
}
TimestreamTarget writes writes publishing metrics to AWS Timestream.
func (*TimestreamTarget) SendMeasurement ¶
func (target *TimestreamTarget) SendMeasurement(measurement indoorclimate.IndoorClimateMeasurement) error
Send given indoor climate data to AWS Timestream.