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

[Feature] Identity carry over part 6 / Configure Identity from constuctor #194

Merged
merged 88 commits into from
Dec 19, 2016

Conversation

mennopruijssers
Copy link
Contributor

Instead of specifying the identity after bootstrap, rename the existing Identity and IdentityResolverFunc options to Address and AddressResolverFunc and add an Identity option to specify the identity.

Note: this introduces a backwards incompatible change. CHANGES.md contains a go fmt command to resolve any issues.

Nils Dijk added 30 commits November 24, 2016 15:28
also make sure the local labels map is immutable

#### Change to identity-option

Prior to ringpop NEXT the address was used as the identity of a member. Starting with version NEXT, it's possible to
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't forget to change NEXT here as well when releasing.


// IdentityResolverFunc is used to specify a function that will called when
// the Ringpop instance needs to resolve its identity (typically, on
// AddressResolverFunc is used to specify a function that will called when
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: s/will called/will be called/

func Identity(identity string) Option {
return func(r *Ringpop) error {
if util.HostportPattern.MatchString(identity) {
return errors.New("a hostport is not valid as an identity")
Copy link
Contributor

Choose a reason for hiding this comment

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

maybe define an error at the top that is exported and returned here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Was thinking the same but all other errors in this file are created inline. I chose to follow the code style (of this file).

@@ -2,7 +2,7 @@

declare project_root="${0%/*}/.."
declare ringpop_common_dir="${0%/*}/ringpop-common"
declare ringpop_common_branch="menno/allow-multi-checksum"
declare ringpop_common_branch="feature/identity"
Copy link
Contributor

Choose a reason for hiding this comment

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

Lets make sure to change this to master before landing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done!

Menno Pruijssers added 21 commits December 15, 2016 13:08
moved addressChecksummer to a test file since it’s only used for validation backwards compatibility.
@mennopruijssers mennopruijssers changed the base branch from feature/ring-multi-checksum to dev December 19, 2016 12:40
@mennopruijssers mennopruijssers merged commit 2c4dfb2 into dev Dec 19, 2016
@mennopruijssers mennopruijssers deleted the feature/refactor-identity-option branch December 19, 2016 13:52
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