connector

package
v0.0.0-...-e64aa6a Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2018 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	VERSION = "1.0"
	NAME    = "sensorthings connector"
)

constants

Variables

View Source
var (
	// Modules holds all loaded modules including their status
	Modules = make(map[string]*module.IConnectorModule, 0)
)

Functions

func Start

func Start(config configuration.ConnectorConfig)

Start the connector

func StartHTTPServer

func StartHTTPServer(host string, port int, modules map[string]*module.IConnectorModule)

StartHTTPServer starts the HTTP server

func Stop

func Stop()

Stop the connector

Types

type State

type State struct {
	On       bool     `json:"on"`
	ModuleID string   `json:"moduleId"`
	Errors   []string `json:"errors"`
}

State can be send to a server endpoint to start or stop a module

Jump to

Keyboard shortcuts

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