-
Notifications
You must be signed in to change notification settings - Fork 9.9k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
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... |
2d10e98
to
8554631
Compare
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. |
3e4b1c9
to
30583e6
Compare
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 without duplicating code, or trailing behind the latest upstream etcd changes. It puts all of the common network connection code into a new struct...
30583e6
to
f89aaa5
Compare
FWIW The tests pass on my machine once I patch https://github.com/kr/pty/issues/21#issuecomment-224487979 I have no idea what's failing, but the code does work correctly. Thanks for your consideration. |
These patches are proposed upstream changes and code for and from etcd. Ideally we would revert this patch when/if things are merged upstream! The majority of the work is in: etcd-io/etcd#5584
Superseded by #5925. Closing |
These patches are proposed upstream changes and code for and from etcd. Ideally we would revert this patch when/if things are merged upstream! The majority of the work is in: etcd-io/etcd#5584
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...