forked from hudl/fargo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Accommodate JSON data center metadata translation
When the Eureka server encodes an instance as JSON, it will sometimes write the data center metadata values that look like numbers as JSON numbers, rather than writing all metadata values as strings. Demanding that all metadata values arrive as JSON strings precludes proper decoding of instances, so be more flexible by first decoding the metadata values as any JSON type, and then projecting the values that are not strings back to strings. Note that we only project decoded Go types bool, float64, and nil; while it's possible that Go can decode a value of type []interface{} or map[string]interface{}, we make no effort to project those values.
- Loading branch information
Showing
3 changed files
with
45 additions
and
7 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