-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp.go
More file actions
41 lines (30 loc) · 783 Bytes
/
app.go
File metadata and controls
41 lines (30 loc) · 783 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
package main
import (
"docker-visualizer/aggregator/graph"
"docker-visualizer/aggregator/operations"
"docker-visualizer/aggregator/rest"
"docker-visualizer/aggregator/sse"
"docker-visualizer/aggregator/utils"
"docker-visualizer/aggregator/version"
log "github.com/sirupsen/logrus"
)
var (
VERSION string
COMMIT string
BRANCH string
)
func init() {
version.Info(VERSION, COMMIT, BRANCH)
}
func main() {
streamChannel := make(chan []byte)
go sse.Start(&streamChannel)
conn := utils.SetupGrpcConnection()
defer conn.Close()
g := graph.NewGraphClient(conn)
restServer := rest.NewRestServer(g)
go restServer.Listen()
listener := utils.SetupGrpcListener()
log.Info("Starting grpc server")
operations.NewGrpcOperations(&streamChannel, g).Serve(listener)
}