consumers

package
v0.0.0-...-f17446d Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 12 Imported by: 0

README

Consumers

Consumers provide an abstraction of various Mainflux consumers. Mainflux consumer is a generic service that can handle received messages - consume them. The message is not necessarily a Mainflux message - before consuming, Mainflux message can be transformed into any valid format that specific consumer can understand. For example, writers are consumers that can take a SenML or JSON message and store it.

Consumers are optional services and are treated as plugins. In order to run consumer services, core services must be up and running.

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

For more information about service capabilities and its usage, please check out the API documentation.

Documentation

Overview

Package consumers contain the domain concept definitions needed to support Mainflux consumer services functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Start

func Start(id string, sub messaging.Subscriber, consumer Consumer, configPath string, logger logger.Logger) error

Start method starts consuming messages received from NATS. This method transforms messages to SenML format before using MessageRepository to store them.

Types

type Consumer

type Consumer interface {
	// Consume method is used to consumed received messages.
	// A non-nil error is returned to indicate operation failure.
	Consume(messages interface{}) error
}

Consumer specifies message consuming API.

Directories

Path Synopsis
Package notifiers contain the domain concept definitions needed to support Mainflux notifications functionality.
Package notifiers contain the domain concept definitions needed to support Mainflux notifications functionality.
api
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.
postgres
Package postgres contains repository implementations using PostgreSQL as the underlying database.
Package postgres contains repository implementations using PostgreSQL as the underlying database.
smpp
Package smpp contains the domain concept definitions needed to support Mainflux SMS notifications.
Package smpp contains the domain concept definitions needed to support Mainflux SMS notifications.
smtp
Package smtp contains the domain concept definitions needed to support Mainflux SMTP notifications.
Package smtp contains the domain concept definitions needed to support Mainflux SMTP notifications.
tracing
Package tracing contains middlewares that will add spans to existing traces.
Package tracing contains middlewares that will add spans to existing traces.
Package writers contain the domain concept definitions needed to support Mainflux writer services functionality.
Package writers contain the domain concept definitions needed to support Mainflux writer services functionality.
api
cassandra
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.
influxdb
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.
mongodb
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.
postgres
Package postgres contains repository implementations using Postgres as the underlying database.
Package postgres contains repository implementations using Postgres as the underlying database.
timescale
Package timescale contains repository implementations using Timescale as the underlying database.
Package timescale contains repository implementations using Timescale as the underlying database.

Jump to

Keyboard shortcuts

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