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

Implement PartitonHub #3287

Merged
merged 7 commits into from
Jan 23, 2018
Merged

Implement PartitonHub #3287

merged 7 commits into from
Jan 23, 2018

Conversation

marcpiechura
Copy link
Contributor

closes #3111


#region internal classes

private interface IConsumerEvent { }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't consider this a mistake, but I'm starting to think, that in the future, we should favor tagged unions over this approach - no in every case, but for sure in cases like several singletons and one type with a error field. Example:

struct ConsumerEvent 
{
    enum ConsumerEventType { Wakeup, Initialize, HubCompleted }
    
    readonly ConsumerEventType Type;
    readonly Exception Failure;
    ....
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, we should do that.


private sealed class HubCompleted : IConsumerEvent
{
public Option<Exception> Failure { get; }
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are you sure we need an Option<> here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I probably wanted to make it explicit that it can be null/none ( from a public api point of view ), but since it’s private we don’t need it.

@Horusiath
Copy link
Contributor

@marcpiechura It's good, we can merge it. Right now I'm at work, so I cannot restart tests failing tests, but they are not related to the changes in this PR.

@marcpiechura marcpiechura merged commit e4ddfcb into akkadotnet:dev Jan 23, 2018
@Aaronontheweb Aaronontheweb added this to the 1.3.4 milestone Jan 24, 2018
Aaronontheweb pushed a commit that referenced this pull request Feb 1, 2018
* Implement PartitionHub

* port docs

* fix formatting

* API approval

* address remarks
Aaronontheweb pushed a commit that referenced this pull request Feb 19, 2018
* Implement PartitionHub

* port docs

* fix formatting

* API approval

* address remarks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement PartitionHub
3 participants