deviceSource

package
v0.0.0-...-12a24cc Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsumeFromStreamProvider

func ConsumeFromStreamProvider(consumer chan dc.DeviceMessage, plog log.Logger)

ConsumeFromDeviceStream - Stream Listener

func NewDeviceSourceService

func NewDeviceSourceService(cfg cc.Config, repo dc.Repository, stream StreamProvider, plog log.Logger) dc.DeviceEventProvider

*

  • NewDeviceSourceService() *
  • Create a New NewDeviceSourceService and initializes it.

func Start

func Start(dfg cc.Config, repo dc.Repository, dProvider StreamProvider) (dc.DeviceEventProvider, error)

* Start() * * Initialize this service

func Stop

func Stop()

* Stop * Cleans up this service

Types

type StreamProvider

type StreamProvider interface {
	ActivateNotifications() chan dc.DeviceMessage
	GetPublishChannel() chan dc.DeviceMessage
	GetNotifyChannel() chan dc.DeviceMessage
	CreateQueueDeviceMessage(qmsg dc.QueueMessage) dc.DeviceMessage
	CreateDemoDeviceMessage(topic string, payload []byte, idCounter uint16, retained bool, qos byte) dc.DeviceMessage
}

Message Interface for MQTT and Demo

Jump to

Keyboard shortcuts

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