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

redis : fixed ip version indistinguishability #2

Merged
merged 2 commits into from
Dec 27, 2016

Conversation

sudarshan-reddy
Copy link

Added a pseudo decorator to seeder and leecher prefixes to distinguish between ip6 and ip4 peers.

} else {
return ipv4
}
case bool:

Choose a reason for hiding this comment

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

instead of doing this, we could directly use ipv4 and upv6 strings in the ScrapeSwarm function like below

...
var ipType string = ipv4
if v6 {
  ipType = ipv6
}

@@ -84,34 +89,53 @@ func addKeyPrefix(namespacePrefix string, command string) string {
return command
}

func getIPType(ip interface{}) string {

Choose a reason for hiding this comment

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

can be shorted as just ipType.

@@ -84,34 +89,53 @@ func addKeyPrefix(namespacePrefix string, command string) string {
return command

Choose a reason for hiding this comment

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

remove the function and directly concatenate the keyPrefix with "seeder" and "leecher"

@sudarshan-reddy sudarshan-reddy merged commit 17ef429 into ri-master Dec 27, 2016
@sudarshan-reddy sudarshan-reddy deleted the redis-ipvfix branch December 27, 2016 09:55
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.

2 participants