forked from easy-cloud-Knet/KWS_Control
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
32 lines (28 loc) · 727 Bytes
/
main.go
File metadata and controls
32 lines (28 loc) · 727 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
package main
import (
//"fmt"
_ "os"
api "github.com/easy-cloud-Knet/KWS_Control/api/server"
WorkerConn "github.com/easy-cloud-Knet/KWS_Control/api/workercont"
vms "github.com/easy-cloud-Knet/KWS_Control/vm"
)
func main() {
//fmt.Println("hellot")
//var wg sync.WaitGroup
var TaskHandlersPool WorkerConn.TaskHandler
WorkerConn.InitWorkers(&TaskHandlersPool)//스레드를 초기화하는 함수
contextStruct := vms.InitializeDevices()//VM을 정의하는 함수
//wg.Add()
//api.Lock()
go func() {
err := api.Server(8080, &TaskHandlersPool, &contextStruct)
//wg.Wait()
//api.Unlock()
if err != nil {
panic(err)
}
}()
//api.Done()
WorkerConn.PseudoRequestSender(&TaskHandlersPool)
select {}
}