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

Switch task ID to Task interface throughout. #133

Merged
merged 2 commits into from
Jul 22, 2015
Merged

Conversation

schmichael
Copy link
Contributor

This allows users to implement coordinator-specific Task structs,
although Balancers and Handlers will have to type assert/switch the
metafora.Task to the cooordinator-specific implementation.

To allow for coordinator reuse with Task implementation variation, the
m_etcd.Coordinator allows users to define a custom NewTask function to
unmarshal the etcd task node into a use case specific struct.

Core Consumer now has a RunningTask interface that wraps the underlying
Task interface so that the struct underlying the Task interface returned
by a Coordinator remains unchanged.

Core Consumer now has a RunningTask interface that wraps the underlying
Task interface so that the struct underlying the Task interface returned
by a Coordinator remains unchanged.

This allows users to implement coordinator-specific Task structs,
although Balancers and Handlers will have to type assert/switch the
metafora.Task to the cooordinator-specific implementation.

To allow for coordinator reuse with Task implementation variation, th
m_etcd.Coordinator allows users to define a custom NewTask function to
unmarshal the etcd task node into a use case specific struct.
@araddon
Copy link
Contributor

araddon commented Jul 22, 2015

nice! 👍 much more flexible interface

@mdmarek
Copy link
Contributor

mdmarek commented Jul 22, 2015

👍

schmichael added a commit that referenced this pull request Jul 22, 2015
Switch task ID to  Task interface throughout.
@schmichael schmichael merged commit 8ecb296 into master Jul 22, 2015
@schmichael schmichael deleted the task-interface branch July 22, 2015 23:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants