Commit Graph

11 Commits

Author SHA1 Message Date
kaiyou adc7a807df Expose ClusterName instead of Banner/StatePath 2020-05-27 23:26:29 +02:00
kaiyou 31b8263e96 Use the StatePath to config when loading the state 2020-05-27 23:26:29 +02:00
kaiyou e9b9239eae Reinstante cluster.LocalNode
This makes for more straightforward calls. Also, generate
the localNode directly in wg.New.
2020-05-13 13:52:54 +02:00
kaiyou 078946dbdd Use localNode to store the local node name
Also rename setupDelegate to SetLocalNode, so that
main can call SetLocalNode then Update().
2020-05-13 13:52:54 +02:00
kaiyou 28a31efc1f Rename saveState to state.save 2020-05-13 13:52:54 +02:00
kaiyou d85fb84398 Unexport state from the cluster package 2020-05-13 13:52:54 +02:00
kaiyou faf1c35d96 Implement the delegate interface on Node
Implementing on Node makes a bit more sense than implementing on Cluster
even if the difference in code is insignificant.
2020-05-13 13:52:54 +02:00
kaiyou 5d1acc1fab Add documentation to public functions and types 2020-05-13 13:52:54 +02:00
kaiyou 13e1515f7d Split cluster into multiple files 2020-05-13 13:52:54 +02:00
kaiyou 46da51b7aa Implement node function as type functions
This means nodeMeta can be private again, and also makes it
easier to pass a Node object to the cluster for local meta,
instead of a generic byte[] function.

For later updating, that node is passed using Update() instead
of New().
2020-05-13 13:52:54 +02:00
kaiyou dadfbee083 Split the application into modules
Splitting into modules will help keep concerns separate,
at the cost of a slightly more verbose code.
2020-05-13 13:52:54 +02:00