Skip to content

Commit

Permalink
Merge pull request apolloconfig#28 from yaxu666/master
Browse files Browse the repository at this point in the history
启动不成功时,返回错误
  • Loading branch information
zouyx committed Aug 26, 2018
2 parents 27e7056 + 1ab5ec2 commit 078ee87
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions start.go
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
package agollo

//start apollo
func Start() {
StartWithLogger(nil)
func Start() error {
return StartWithLogger(nil)
}

func StartWithLogger(loggerInterface LoggerInterface) {
func StartWithLogger(loggerInterface LoggerInterface) error {
if loggerInterface != nil {
initLogger(loggerInterface)
}

//first sync
notifySyncConfigServices()
error := notifySyncConfigServices()

//start auto refresh config
go StartRefreshConfig(&AutoRefreshConfigComponent{})

//start long poll sync config
go StartRefreshConfig(&NotifyConfigComponent{})

return error
}

0 comments on commit 078ee87

Please sign in to comment.