554325746@qq.com
2019-06-29 5083277b55e704606a1d198e470f143780e45ce7
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 (
    "fmt"
    "log"
    "net/http"
    "flag"
    _ "net/http/pprof"
    "time"
 
    "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() {
    flag.Parse()
    time.Sleep(time.Second)
 
    // pprof 用于分析性能
    go func() {
        log.Println(http.ListenAndServe("0.0.0.0:6061", 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 {}
}