transformers

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

README

Message Transformers

A transformer service consumes events published by Magistrala adapters (such as MQTT and HTTP adapters) and transforms them to an arbitrary message format. A transformer can be imported as a standalone package and used for message transformation on the consumer side.

Magistrala SenML transformer is an example of Transformer service for SenML messages.

Magistrala writers are using a standalone SenML transformer to preprocess messages before storing them.

Documentation

Overview

Package transformers contains the domain concept definitions needed to support Magistrala transformer services functionality.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToUnixNano

func ToUnixNano[N number](t N) N

ToUnixNano converts time to UnixNano time format.

Types

type Transformer

type Transformer interface {
	// Transform Magistrala message to any other format.
	Transform(msg *messaging.Message) (interface{}, error)
}

Transformer specifies API form Message transformer.

Directories

Path Synopsis
Package json contains JSON transformer.
Package json contains JSON transformer.
Package senml contains SenML transformer.
Package senml contains SenML transformer.

Jump to

Keyboard shortcuts

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