Module: EventStore::HTTP::Cluster::MemberState

Defined in:
lib/event_store/http/cluster/member_state.rb

Class Method Summary collapse

Class Method Details

.digest(state) ⇒ Object



17
18
19
20
21
22
23
24
# File 'lib/event_store/http/cluster/member_state.rb', line 17

def self.digest(state)
  case state
  when leader then 'Leader'
  when follower then 'Follower'
  when unknown then 'Unknown'
  else state
  end
end

.followerObject



9
10
11
# File 'lib/event_store/http/cluster/member_state.rb', line 9

def self.follower
  'Slave'
end

.leaderObject



5
6
7
# File 'lib/event_store/http/cluster/member_state.rb', line 5

def self.leader
  'Master'
end

.unknownObject



13
14
15
# File 'lib/event_store/http/cluster/member_state.rb', line 13

def self.unknown
  'Unknown'
end