示例#1
0
文件: main.go 项目: chansuke/fuji
func Action(c *cli.Context) {
	err := ValidateArgs(c)
	if err != nil {
		log.Error(err)
		cli.ShowAppHelp(c)
		return
	}

	if c.Bool("d") {
		log.SetLevel(log.DebugLevel)
	}

	log.Println("start fuji gateway")
	fuji.Start(c.String("conf"))
}
示例#2
0
// publish test to broker on localhost
// dummydevice is used as a source of published message
func TestConnectLocalPub(t *testing.T) {

	go fuji.Start("connectlocalpub.ini")

	time.Sleep(2 * time.Second)
}