uber / ringpop-go

Scalable, fault-tolerant application-layer sharding for Go applications
http://www.uber.com
MIT License
835 stars 83 forks source link

[Feature] Identity carry over part 2 / Membership package #189

Closed thanodnl closed 7 years ago

thanodnl commented 8 years ago

This PR is part 2 for identity carry over.

In this PR we introduce a stricter interface for what a Membership is in a membership package. The membership defines an 'observable membership' for the application. Only containing members that are an active part of the membership eg. No faulty, leave or tombstone members will be observable.

It introduces what a Member is via an interface and makes sure that the swim.Member implements it.

Lastly it adds an event that is triggered when changes happen to the membership. This event is different from the swim event that contains changes in that it contains the Before and After state of a Member that can be used by the application to respond to.