-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* initial delta support * added tests for delta feature * updated documentation and default * fixed type in config * fixed eslint errors * switching travis to modern node * Additional test for test coverage to pass. * Additional validateConfig() test. * fixed mislabeled variable * fixed sync issue caused by validation of deleted instances
- Loading branch information
Showing
8 changed files
with
363 additions
and
38 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
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
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
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
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
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 |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
General utilities for handling processing of delta changes from eureka. | ||
*/ | ||
export function arrayOrObj(mysteryValue) { | ||
return Array.isArray(mysteryValue) ? mysteryValue : [mysteryValue]; | ||
} | ||
|
||
export function findInstance(a) { | ||
return b => a.hostName === b.hostName && a.port.$ === b.port.$; | ||
} | ||
|
||
export function normalizeDelta(appDelta) { | ||
return arrayOrObj(appDelta).map((app) => { | ||
app.instance = arrayOrObj(app.instance); | ||
return app; | ||
}); | ||
} |
Oops, something went wrong.