-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathmain.go
More file actions
43 lines (34 loc) · 793 Bytes
/
main.go
File metadata and controls
43 lines (34 loc) · 793 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package main
import (
"github.com/RadiumByte/StreamServer/api"
"github.com/RadiumByte/StreamServer/app"
"github.com/RadiumByte/StreamServer/ral"
"github.com/RadiumByte/StreamServer/yal"
"fmt"
)
func run(errc chan<- error) {
CarIP := "192.168.183.50"
Port := ":8080"
robot, err := ral.NewRoboCar(CarIP, Port)
if err != nil {
errc <- err
return
}
youtubeClient, err := yal.NewYoutubeClient()
if err != nil {
errc <- err
return
}
application := app.NewApplication(youtubeClient, robot, errc)
server := api.NewWebServer(application)
server.Start(errc)
}
func main() {
fmt.Println("Streaming Management Server is preparing to start...")
errc := make(chan error)
go run(errc)
if err := <-errc; err != nil {
fmt.Print("Error occured: ")
fmt.Println(err)
}
}