Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: worker geolocation #1692

Merged
merged 2 commits into from Nov 14, 2018
Merged

feat: worker geolocation #1692

merged 2 commits into from Nov 14, 2018

Conversation

3Hren
Copy link
Member

@3Hren 3Hren commented Nov 12, 2018

Now Workers are capable to detect the country ISO code where they are located and provide it in status handler.

@3Hren 3Hren added S: Worker This PR/Issue changes Worker T: feature This PR/Issue adds a new feature P: medium This PR/Issue has normal priority V: minor This PR/Issue required minor version to be bumped labels Nov 12, 2018
@@ -307,6 +316,31 @@ func (m *Worker) setupMaster() error {
return nil
}

func (m *Worker) setupGeoIP() error {
if len(m.publicIPs) == 0 {
return fmt.Errorf("failed to detect at least one public IP address")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably, It will be better to try to detect IP address via some external service

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch! Fixed, bro.

Now Workers are capable to detect the country ISO code where they are located and provide it in status handler.
Copy link
Member

@nikonov1101 nikonov1101 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@3Hren 3Hren merged commit ef846bb into master Nov 14, 2018
@3Hren 3Hren deleted the feat/worker/geoip branch November 14, 2018 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P: medium This PR/Issue has normal priority S: Worker This PR/Issue changes Worker T: feature This PR/Issue adds a new feature V: minor This PR/Issue required minor version to be bumped
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants