23 lines
439 B
Go
23 lines
439 B
Go
package main
|
|
|
|
import (
|
|
"git.timovolkmann.de/gyrogpsc/core"
|
|
)
|
|
|
|
const (
|
|
TCP_PORT = ":3010"
|
|
HTTP_PORT = ":3011"
|
|
)
|
|
|
|
func main() {
|
|
dispatcher := core.NewDispatcher()
|
|
processor := core.NewPipeline(dispatcher, 20, 10000)
|
|
collectRoutines(processor)
|
|
core.HttpListenAndServe(dispatcher, HTTP_PORT)
|
|
}
|
|
|
|
func collectRoutines(proc core.Processor) {
|
|
// collect Sensor data from JSON over TCP in Goroutine
|
|
go core.TcpCollector(proc, TCP_PORT)
|
|
}
|