mgw

package
v1.0.17 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultCorrelation = &CorrelationImpl{}

Functions

func ComFactory

func ComFactory(ctx context.Context, config configuration.Config, responseListener func(msg messages.ProtocolMsg) error, errorListener func(msg messages.ProtocolMsg) error) (producer interfaces.Producer, err error)

func DefaultIdProviderImpl

func DefaultIdProviderImpl() string

func IotFactory

func IotFactory(ctx context.Context, config configuration.Config) (result interfaces.Iot, err error)

func MarshallerFactory

func MarshallerFactory(ctx context.Context, config configuration.Config, iot interfaces.Iot) (interfaces.Marshaller, error)

func TimescaleFactory

func TimescaleFactory(ctx context.Context, config configuration.Config) (interfaces.Timescale, error)

Types

type ComImpl

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

func (*ComImpl) SendCommand

func (this *ComImpl) SendCommand(msg messages.ProtocolMsg) (err error)

type Command

type Command struct {
	CommandId string `json:"command_id"`
	Data      string `json:"data"`
}

type Correlation

type Correlation interface {
	Get(id string) (messages.ProtocolMsg, error)
	Set(id string, element messages.ProtocolMsg) error
}

type CorrelationImpl

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

func (*CorrelationImpl) Get

func (this *CorrelationImpl) Get(id string) (messages.ProtocolMsg, error)

func (*CorrelationImpl) Set

func (this *CorrelationImpl) Set(id string, element messages.ProtocolMsg) error

type Timescale

type Timescale struct {
	TimescaleWrapperUrl string
}

func NewTimescale

func NewTimescale(TimescaleUrl string) (*Timescale, error)

func (*Timescale) Query

func (this *Timescale) Query(token auth.Token, request []interfaces.TimescaleRequest, timeout time.Duration) (result []interfaces.TimescaleResponse, err error)

type TimescaleRequest

type TimescaleRequest struct {
	DeviceId   string
	ServiceId  string
	ColumnName string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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