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

state: Refactor Task IP sourcing #267

Merged
merged 2 commits into from
Sep 17, 2015
Merged

Conversation

tsenart
Copy link
Contributor

@tsenart tsenart commented Sep 17, 2015

This commit refactors the Task IP sourcing code to gracefully account
for the new NetworkInfo source with the same structure and be easily
changed to distinguish between IPv4 and IPv6.

@tsenart
Copy link
Contributor Author

tsenart commented Sep 17, 2015

/cc @jdef

@@ -1,11 +1,13 @@
package state
package state_test
Copy link
Contributor

Choose a reason for hiding this comment

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

what is the advantage of doing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Privacy enforcement.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Package state_test has no access to private identifiers of package state.

Copy link
Contributor

Choose a reason for hiding this comment

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

that's pretty interesting. i'm wondering if I can use this in the k8s-mesos "km" main package since it looks like the _test.go stuff in package main is bleeding into the generated non-test executable.

@jdef jdef added WIP and removed PTAL labels Sep 17, 2015
@jdef
Copy link
Contributor

jdef commented Sep 17, 2015

very elegant. some concerns about aggregation of IPs.

This commit refactors the Task IP sourcing code to gracefully account
for the new `NetworkInfo` source with the same structure and be easily
changed to distinguish between IPv4 and IPv6.
@tsenart tsenart added PTAL and removed WIP labels Sep 17, 2015
@jdef jdef added WIP and removed PTAL labels Sep 17, 2015
jdef added a commit that referenced this pull request Sep 17, 2015
@jdef jdef merged commit 1b88053 into read-networkinfo Sep 17, 2015
@jdef jdef removed the WIP label Sep 17, 2015
@jdef jdef deleted the read-networkinfo-suggestion branch September 17, 2015 21:47
@tsenart tsenart mentioned this pull request Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants