feat: add oliver elastic support; update db(sqlite)
This commit is contained in:
@ -18,16 +18,18 @@ var (
|
||||
|
||||
func execute(ctx context.Context) error {
|
||||
tool.Must(opt.Init(filename))
|
||||
tool.Must(db.Init())
|
||||
tool.Must(db.Init(ctx, opt.Cfg.DB.Uri))
|
||||
tool.Must(cache.Init())
|
||||
|
||||
// todo: if elastic search required
|
||||
// tool.Must(es.Init())
|
||||
//tool.Must(es.Init(ctx, opt.Cfg.ES.Uri))
|
||||
// 或者使用 https://github.com/olivere/elastic
|
||||
//tool.Must(elastic.Init(ctx, opt.Cfg.ES.Uri))
|
||||
|
||||
// todo: if nebula required
|
||||
// tool.Must(nebula.Init(ctx, opt.Cfg.Nebula))
|
||||
|
||||
tool.Must(model.Init(db.New()))
|
||||
tool.Must(model.Init(db.Default.Session()))
|
||||
tool.Must(controller.Init(ctx))
|
||||
tool.Must(api.Start(ctx))
|
||||
|
||||
|
Reference in New Issue
Block a user