Skip to content

Instantly share code, notes, and snippets.

@IS-KH
Created May 16, 2017 00:59
Show Gist options
  • Save IS-KH/153341ff7fbbd1fe96c1b360c8dd38cd to your computer and use it in GitHub Desktop.
Save IS-KH/153341ff7fbbd1fe96c1b360c8dd38cd to your computer and use it in GitHub Desktop.
coffee
#Master
status : init
get config lists
discovery topology
if get complete topology (means a ring and include two masters)
if config is empty
change status to topology_without_config
wait_another_master_status and send_master_status({macaddr : master.macaddr , status : master.status})
else
else (timeout : 3 mins)
if config is empty
else
the number of topology node lists is equal the number of config lists
if yes
get another master
wait_another_master_status : (another_master)->
if another_master.status is
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment