Score
0
Watch 8 Star 17 Fork 15

Ulric Qin / dinp-serverGo

Create your Gitee Account
Explore and code with more than 5 million developers,Free private repositories !:)
Sign up
This repository doesn't specify license. Without author's permission, this code is only for learning and cannot be used for other purposes.
DINP中的master组件,控制集群中所有计算节点 spread retract

Clone or download
main.go 551 Bytes
Copy Edit Web IDE Raw Blame History
Ulric Qin authored 2015-02-08 23:04 . init github version
package main
import (
"flag"
"fmt"
"github.com/dinp/server/cron"
"github.com/dinp/server/g"
"github.com/dinp/server/hbs"
"github.com/dinp/server/http"
"os"
)
func main() {
cfg := flag.String("c", "cfg.json", "configuration file")
version := flag.Bool("v", false, "show version")
flag.Parse()
if *version {
fmt.Println(g.VERSION)
os.Exit(0)
}
g.ParseConfig(*cfg)
g.InitRedisConnPool()
g.InitDbConnPool()
go cron.CompareState()
go cron.CheckStale()
go cron.SyncRoutes()
go cron.SyncDomain()
go http.Start()
hbs.Start()
}

Comment ( 0 )

Sign in for post a comment

Go
1
https://gitee.com/cnperl/dinp-server.git
git@gitee.com:cnperl/dinp-server.git
cnperl
dinp-server
dinp-server
master

Search