core

package
v0.0.0-...-c205787 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2020 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {

	// tm connection
	TMService tmclient.TMService

	// data store
	Store *store.Data

	// is core application running?
	IsRun bool
	// contains filtered or unexported fields
}

Application is a main component of uplink that consists of uplink protocol and mqtt client

func New

func New(tm tmclient.TMService, st *store.Data) *Application

New creates new application.

func (*Application) Exit

func (a *Application) Exit()

Exit closes amqp connection then closes all channels and return from all pipeline stages

func (*Application) Models

func (a *Application) Models() []string

Models returns list of registered model's names

func (*Application) RegisterModel

func (a *Application) RegisterModel(m model.Model)

RegisterModel registers model m on application a

func (*Application) Run

func (a *Application) Run() error

Run runs application. this function connects mqtt client and then register its topic

Jump to

Keyboard shortcuts

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