go-co-op / gocron-etcd-elector

MIT License
9 stars 3 forks source link

[FEATURE] - upgraded elector example using gocron-v2 #24

Closed seriouspoop closed 4 months ago

seriouspoop commented 4 months ago

Is your feature request related to a problem? Please describe

I was struggling to find a example for using gocron-etcd-elector, never understood how to make it work with multiple instances of an application.

Describe the solution you'd like

I have written a new and better example which shows the use of replica instances and etcd cluster, and a live view of leader election in docker logs like in a production environment.

Describe alternatives you've considered

NA

Additional context

NA

JohnRoesler commented 4 months ago

I have written a new and better example which shows the use of replica instances and etcd cluster, and a live view of leader election in docker logs like in a production environment.

@seriouspoop could you share that example?

seriouspoop commented 4 months ago

@JohnRoesler yeah here you go, https://github.com/seriouspoop/gocron-etcd-elector-example

JohnRoesler commented 4 months ago

Would you like to PR this in to the example directory? Or reference it by link to your repo? Happy to have a solid example included, and happy to include it however you'd like