Location resolution through oracle#894
Merged
vkuznecovas merged 6 commits intomasterfrom Apr 23, 2019
Merged
Conversation
soffokl
reviewed
Apr 18, 2019
| // Resolver allows resolving location by ip | ||
| type Resolver interface { | ||
| DetectLocation() (Location, error) | ||
| ResolveLocation(ip net.IP) (Location, error) |
Member
There was a problem hiding this comment.
It was kept for cases when a consumer wants to check the provider's IP, whether it's really residential or not.
We, probably, don't have another place for that now.
tadaskay
reviewed
Apr 19, 2019
54d43b8 to
07b4db4
Compare
soffokl
requested changes
Apr 23, 2019
4a28393 to
374265c
Compare
soffokl
reviewed
Apr 23, 2019
| return fmt.Errorf("unknown location detector type: %s", options.Type) | ||
| } | ||
|
|
||
| di.LocationResolver, err = location.CreateLocationResolver(di.IPResolver, options.Country, options.City, options.Type, options.NodeType, options.Address, options.ExternalDb, configDirFlag) |
Member
There was a problem hiding this comment.
We are passing every single option separately, maybe it's time to pass just OptionsLocation?
Contributor
Author
There was a problem hiding this comment.
i'll ahve to ref the node package, which in turn add cyclic dependencies. It's either move the model somewhere, or define a new one here and use that instead. Neither seems to be a proper way of doing things :)
soffokl
previously approved these changes
Apr 23, 2019
374265c to
159d3bf
Compare
Waldz
previously approved these changes
Apr 23, 2019
tadaskay
approved these changes
Apr 23, 2019
159d3bf to
374265c
Compare
soffokl
approved these changes
Apr 23, 2019
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Updates #863