Commit Graph

9 Commits

Author SHA1 Message Date
Sean Chittenden 640ced7c11 Use empty string for addr in ServerDetails.String() 2016-03-26 19:30:04 -07:00
Sean Chittenden e0f29c17cd Guard against a nil ServerDetails.Addr
It's not clear how or why this would ever be nil, but some of the unit tests produce a nil addr.  Be defensive.
2016-03-26 19:29:31 -07:00
Sean Chittenden a9b3dba05f Add a struct key type for server_details 2016-03-26 17:58:12 -07:00
Sean Chittenden c18158aac3 Delete the right tag
"role" != "consul"
2016-03-25 14:31:48 -07:00
Sean Chittenden 328728c88a Negative check: test an invalid condition 2016-03-25 12:22:33 -07:00
Sean Chittenden 22e546ff32 Test to make sure bootstrap is missing 2016-03-25 12:20:12 -07:00
Sean Chittenden 5f035da4f1 Be more Go idiomatic w/ variable names: s/valid/ok/g
Cargo culting is bad, m'kay?

Pointy Hat: sean-
2016-03-25 12:14:24 -07:00
Sean Chittenden 231768faea Simplify error handling
Rely on Serf for liveliness.  In the event of a failure, simply cycle the server to the end of the list.  If the server is unhealthy, Serf will reap the dead server.

Additional simplifications:

*) Only rebalance servers based on timers, not when a new server is readded to the cluster.
*) Back out the failure count in server_details.ServerDetails
2016-03-23 22:10:50 -07:00
Sean Chittenden f3a69c939d Refactor consul.serverParts into server_details.ServerDetails
This may be short-lived, but it also seems like this is going to lead us down a path where ServerDetails is going to evolve into a more powerful package that will encapsulate more behavior behind a coherent API.
2016-03-23 16:15:47 -07:00