Init replication in core

Signed-off-by: cd1989 <chende@caicloud.io>
This commit is contained in:
cd1989 2019-04-04 21:58:31 +08:00
parent 2450dacecb
commit fe004e1bfc

View File

@ -38,6 +38,7 @@ import (
"github.com/goharbor/harbor/src/core/filter"
"github.com/goharbor/harbor/src/core/proxy"
"github.com/goharbor/harbor/src/core/service/token"
"github.com/goharbor/harbor/src/replication/ng"
)
const (
@ -129,8 +130,9 @@ func main() {
}
}
closing := make(chan struct{})
go gracefulShutdown(closing)
if err := ng.Init(); err != nil {
log.Fatalf("failed to initialize replication: %v", err)
}
filter.Init()
beego.InsertFilter("/*", beego.BeforeRouter, filter.SecurityFilter)