Skip to content

Commit

Permalink
Add make-* stats
Browse files Browse the repository at this point in the history
  • Loading branch information
jwolski committed Sep 2, 2015
1 parent 9faeace commit e8780ae
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/membership/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,19 +151,23 @@ Membership.prototype.isPingable = function isPingable(member) {
};

Membership.prototype.makeAlive = function makeAlive(address, incarnationNumber) {
this.ringpop.stat('increment', 'make-alive');
return this._makeUpdate(address, incarnationNumber, Member.Status.alive,
address === this.ringpop.whoami());
};

Membership.prototype.makeFaulty = function makeFaulty(address, incarnationNumber) {
this.ringpop.stat('increment', 'make-faulty');
return this._makeUpdate(address, incarnationNumber, Member.Status.faulty);
};

Membership.prototype.makeLeave = function makeLeave(address, incarnationNumber) {
this.ringpop.stat('increment', 'make-leave');
return this._makeUpdate(address, incarnationNumber, Member.Status.leave);
};

Membership.prototype.makeSuspect = function makeSuspect(address, incarnationNumber) {
this.ringpop.stat('increment', 'make-suspect');
return this._makeUpdate(address, incarnationNumber, Member.Status.suspect);
};

Expand Down

0 comments on commit e8780ae

Please sign in to comment.