Exemple #1
0
func Init(path string) {
	mangoLogger = logger.NewLog(path)

	http.HandleFunc("/mango/bid", MangoBidHandler)
	http.HandleFunc("/mango/win", MangoWinHandler)
	http.HandleFunc("/mango/click", MangoClickHandler)
	http.HandleFunc("/mango/display", MangoDisplayHandler)
}
Exemple #2
0
func main() {
	runtime.GOMAXPROCS(runtime.NumCPU())
	//runtime.GOMAXPROCS(1)

	logger.WinLog = logger.NewLog("win.log")
	logger.ClickLog = logger.NewLog("click.log")
	logger.DisplayLog = logger.NewLog("display.log")
	logger.BidLog = logger.NewLog("bid.log")
	logger.GiveupLog = logger.NewLog("giveup.log")

	mango.Init("mango.log")
	megaMedia.Init("mega.log")

	filter.Init()

	manager.Init("manager.log")
	go manager.CommanderRoutine("124.232.133.211", 6379, "dcc-124.232.133.211")

	panic(http.ListenAndServe(":18124", nil))
}
Exemple #3
0
func main() {
	if len(os.Args) != 3 {
		println("Usage: ", os.Args[0], " <bid log path> <win log path>")
		return
	}
	lw := logger.NewLog(os.Args[1])
	if lw == nil {
		panic("log path " + os.Args[1] + " error")
	}
	wlog := logger.NewLog(os.Args[2])
	if wlog == nil {
		panic("log path " + os.Args[2] + " error")
	}
	for {
		//genBidLog(lw)
		//genWinLog(wlog)
		genClickLog(lw)
		genDisplayLog(wlog)
		time.Sleep(time.Second)
	}
}
Exemple #4
0
func Init(path string) {
	//aes.Init()

	//aes.SetKey("haha, I will never push this key to my github")
	//aes.SetKey("c59olrpd069n9re1r6wycx17q5yydl65")

	megaMediaLogger = logger.NewLog(path)

	http.HandleFunc("/click/yesky", YeskyClickHandler)
	http.HandleFunc("/display/yesky", YeskyDisplayHandler)
	http.HandleFunc("/bid/yesky", YeskyBidHandler)
	http.HandleFunc("/win/yesky", YeskyWinHandler)
}
Exemple #5
0
func Init(path string) {
	managerLogger = logger.NewLog(path)
	cmdTable = "/opt/dspHelloWorld/dspCmd"
}