forked from apolloconfig/agollo
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request apolloconfig#28 from yaxu666/master
启动不成功时,返回错误
- Loading branch information
Showing
1 changed file
with
6 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} |