writers

package
v0.0.0-...-8a250b4 Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

README

Writers

Writers provide an implementation of various message writers. Message writers are services that consume normalized (in SenML format) Mainflux messages and store them in specific data store.

Writers are optional services and are treated as a plugins. In order to run writer services, core services must be up and running. For more info on the platform core services with its dependencies, please check out the Docker Compose file.

For an in-depth explanation of the usage of writers, as well as thorough understanding of Mainflux, please check out the official documentation.

Documentation

Overview

Package writers contain the domain concept definitions needed to support Mainflux writer services functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(nc *nats.Conn, repo MessageRepository, queue string, logger log.Logger) error

Start method starts to consume normalized messages received from NATS.

Types

type MessageRepository

type MessageRepository interface {

	// Save method is used to save published message. A non-nil
	// error is returned to indicate  operation failure.
	Save(mainflux.Message) error
}

MessageRepository specifies message writing API.

func LoggingMiddleware

func LoggingMiddleware(svc MessageRepository, logger log.Logger) MessageRepository

LoggingMiddleware adds logging facilities to the adapter.

func MetricsMiddleware

func MetricsMiddleware(repo MessageRepository, counter metrics.Counter, latency metrics.Histogram) MessageRepository

MetricsMiddleware returns new message repository with Save method wrapped to expose metrics.

Directories

Path Synopsis
Package cassandra contains the domain concept definitions needed to support Mainflux Cassandra writer service.
Package cassandra contains the domain concept definitions needed to support Mainflux Cassandra writer service.
Package influxdb contains the domain concept definitions needed to support Mainflux InfluxDB writer service functionality.
Package influxdb contains the domain concept definitions needed to support Mainflux InfluxDB writer service functionality.
Package mongodb contains the domain concept definitions needed to support Mainflux MondoDB writer service functionality.
Package mongodb contains the domain concept definitions needed to support Mainflux MondoDB writer service functionality.

Jump to

Keyboard shortcuts

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