554325746@qq.com
2019-06-16 5dafbd6b419cfc436aece4ac8b5580532f12afea
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
package main
 
import (
    "fmt"
    "log"
    "net/http"
    _ "net/http/pprof"
 
    "github.com/long/test/camera"
    "github.com/long/test/sdk"
    "github.com/long/test/tasktag"
    "github.com/long/test/util"
 
    //    "github.com/long/test/camera"
    //    "github.com/long/test/sdk"
    //    "github.com/long/test/tasktag"
)
 
var initchan = make(chan bool)
 
func main() {
 
    // pprof 用于分析性能
    go func() {
        log.Println(http.ListenAndServe("0.0.0.0:6060", nil))
    }()
 
    go util.Init(initchan)
 
    fmt.Println("init ok !!!!, start sdk, task, camera init process ....", <-initchan)
    fmt.Println()
    fmt.Println()
    sdk.Init()        //  获取所有算法id ,建立 sdk 主题, 建立sdk server(send, recv 运行)
    tasktag.Init()   // 获取所有任务,建立任务标签, 在数据进入时, 打标签
    camera.Init()   //获取cid, taskid, sdkid ,关系
    select {}
}