mirror of
https://github.com/goharbor/harbor.git
synced 2024-11-27 20:59:10 +01:00
Init replication in core
Signed-off-by: cd1989 <chende@caicloud.io>
This commit is contained in:
parent
2450dacecb
commit
fe004e1bfc
@ -38,6 +38,7 @@ import (
|
|||||||
"github.com/goharbor/harbor/src/core/filter"
|
"github.com/goharbor/harbor/src/core/filter"
|
||||||
"github.com/goharbor/harbor/src/core/proxy"
|
"github.com/goharbor/harbor/src/core/proxy"
|
||||||
"github.com/goharbor/harbor/src/core/service/token"
|
"github.com/goharbor/harbor/src/core/service/token"
|
||||||
|
"github.com/goharbor/harbor/src/replication/ng"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
@ -129,8 +130,9 @@ func main() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
closing := make(chan struct{})
|
if err := ng.Init(); err != nil {
|
||||||
go gracefulShutdown(closing)
|
log.Fatalf("failed to initialize replication: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
filter.Init()
|
filter.Init()
|
||||||
beego.InsertFilter("/*", beego.BeforeRouter, filter.SecurityFilter)
|
beego.InsertFilter("/*", beego.BeforeRouter, filter.SecurityFilter)
|
||||||
|
Loading…
Reference in New Issue
Block a user