注册
app.RegisterCli(name string, callfunc func([]string))
运行 main cli cliname
注册 app.RegisterCrontan(name, timer string, isLock bool, callfunc func()) 运行 main crontab name [save|remove|check]
save 保存计划任务
remove 删除计划任务
check 查看计划任务
注册 RegisterService(name string, callfunc func())
编译程序后执行 main service servicename [install|uninstall|start|stop|restart] install 安装服务
uninstall 删除服务
start 启动服务
stop 关闭服务
程序编译之后直接运行即可,默认是web应用
os.Setenv("app.web",":80") //监听80端口
os.Setenv("key","memcache://")
os.Setenv("key","redis://user:passwd@ip:port/?retries=3&db=1")
os.Setenv("key","redis_cluster://"))
os.Setenv("key","redis_sentinel://user:passwd@ip:port/?retries=3&db=1&servers=ip:port,ip:port"))
web.RegisterRouterGroup("/admin",func (group *RouterGroup){
group.POST("abc",function(x EngineCtx){})
group.GET("abc",function(x EngineCtx){})
group.ANY("abc",function(x EngineCtx){})
})