etcdmain: Refactor etcdStart for use in embedding etcd servers #5584
Conversation
|
This is a new, improved cleaner take on #5432. Don't merge yet, it's still a WIP, but I wanted to push it up to run some tests... |
|
Whoever... I think this is ready for review now. I'm not sure why there is a failure, but it's only on go 1.5 on one arch. Might be unrelated to this patch. I can confirm it works for me! |
|
@xiang90 I decided to write this anyways, in the hopes that you would accept as a good intermediate solution until something more permanent can be written. It is clean and easier to understand, as well as will solve most or all use cases for embedding etcd. As well, if you like this patch, I am happy to update it with comprehensive documentation to describe this. I will also add a note to say that this interface is not to be considered stable for now, in case you'd like to change it in the future. Thanks again for all your reviews. |
|
/cc @heyitsanthony who mentioned he'd look at this too. Thanks. |
purpleidea
referenced
this pull request
Jun 8, 2016
Closed
etcdmain: Refactor etcdStart for use in embedding etcd servers #5432
|
FWIW The tests pass on my machine once I patch kr/pty#21 (comment) I have no idea what's failing, but the code does work correctly. Thanks for your consideration. |
purpleidea
added a commit
to purpleidea/mgmt
that referenced
this pull request
Jun 18, 2016
|
|
purpleidea |
d26b503
|
This was referenced Jun 21, 2016
|
Superseded by #5925. Closing |
purpleidea commentedJun 8, 2016
This patch refactors out the important (and often non-public) portions
of etcdStart that need to get run for use in embedding an etcd server.
This will allow projects just as
mgmt(config) to embed etcd withoutduplicating code, or trailing behind the latest upstream etcd changes.
It puts all of the common network connection code into a new struct...