core

package
v0.0.0-...-e03655c Latest Latest
Warning

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

Go to latest
Published: May 1, 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 tm.Service

	// 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 tm.Service, st *store.Data, ns *nats.EncodedConn) *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) Handle

func (a *Application) Handle(d types.Data)

Handle handles given data into core pipeline

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