Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make etcdmain/serve.go public and more modular #5430

Closed
purpleidea opened this issue May 23, 2016 · 7 comments
Closed

Make etcdmain/serve.go public and more modular #5430

purpleidea opened this issue May 23, 2016 · 7 comments
Milestone

Comments

@purpleidea
Copy link
Contributor

I'd like to discuss making etcdmain/serve.go structs and methods public and more modular for easier use by third parties that are embedded the etcd server. This might also involve refactoring / changing part of startEtcd(). I'm willing to take a crack at the patch if it's something that the project maintainers would be interested in having.

Let me know, thanks!

@xiang90
Copy link
Contributor

xiang90 commented May 23, 2016

It would be interesting... But we do not have bandwidth to do this now. If you have any thoughts or plan about how to do it. We are happy to listen!

@purpleidea
Copy link
Contributor Author

@xiang90 I will try and write the patch assuming you like the idea. If there are any gotchas or issues you foresee I'd appreciate if you could warn me.

Thanks!

@xiang90
Copy link
Contributor

xiang90 commented May 23, 2016

@purpleidea

Start() should probably have several stages, like read user conf -> optional discovery -> prepare etcd server conf -> start http/grpc server -> start etcd server. etc..

One thing we want to do is to move all discovery related logic into one func.

Ideally, user can do Discovery(), which hints the user about how to start the server and where are other peers. There is some discovery logic here inside etcdserver pkg:https://github.com/coreos/etcd/blob/master/etcdserver/server.go#L301 that should be moved to etcdmain.

@purpleidea
Copy link
Contributor Author

I've taken a first crack at this in: #5432

I tested this on v.3.0.0-beta.0, but rebased it to git master to share. Please let me know if anything particular or behaviour wise would have changed since then that would affect this.

Thanks!

@xiang90 xiang90 added this to the unplanned milestone May 24, 2016
@xiang90 xiang90 modified the milestones: v3.1.0, unplanned Jun 20, 2016
@xiang90
Copy link
Contributor

xiang90 commented Jun 20, 2016

bump this to 3.1

@purpleidea
Copy link
Contributor Author

It's probably worth mentioning that #5584 is my recent update to this.

@philips
Copy link
Contributor

philips commented Jun 29, 2016

heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 12, 2016
Lets programs embed etcd.

Fixes etcd-io#5430
heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 13, 2016
heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 13, 2016
heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 13, 2016
heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 13, 2016
heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 13, 2016
heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 13, 2016
heyitsanthony added a commit to heyitsanthony/etcd that referenced this issue Jul 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants