-
Notifications
You must be signed in to change notification settings - Fork 82
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
Conversation
also make sure the local labels map is immutable
… is reflected on the ring
|
||
#### 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 |
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
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") |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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" |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done!
moved addressChecksummer to a test file since it’s only used for validation backwards compatibility.
Instead of specifying the identity after bootstrap, rename the existing
Identity
andIdentityResolverFunc
options toAddress
andAddressResolverFunc
and add anIdentity
option to specify the identity.Note: this introduces a backwards incompatible change.
CHANGES.md
contains ago fmt
command to resolve any issues.