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

Feature/destroy session #599

Merged
merged 7 commits into from
Dec 10, 2018
Merged

Feature/destroy session #599

merged 7 commits into from
Dec 10, 2018

Conversation

zolia
Copy link
Contributor

@zolia zolia commented Dec 6, 2018

Destroys session on failed connect or disconnect.

@zolia zolia requested a review from tadovas as a code owner December 6, 2018 14:04
@zolia zolia requested review from vkuznecovas and soffokl December 6, 2018 15:14
@zolia zolia force-pushed the feature/destroy-session branch from b56fbb4 to 59313c1 Compare December 7, 2018 08:02
@zolia zolia requested a review from soffokl December 7, 2018 08:27
soffokl
soffokl previously approved these changes Dec 7, 2018
@zolia zolia force-pushed the feature/destroy-session branch from 59313c1 to ab6ff2d Compare December 7, 2018 11:54
@zolia zolia requested review from vkuznecovas and soffokl December 7, 2018 11:55
@zolia zolia self-assigned this Dec 7, 2018
@zolia zolia added this to the Keliukis (0.5) milestone Dec 7, 2018
@zolia zolia force-pushed the feature/destroy-session branch from ab6ff2d to bd90750 Compare December 7, 2018 12:15

// destroyConsumer processes session create requests from communication channel.
type destroyConsumer struct {
SessionManager Manager
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need full interface here, only single Destroy method - depend on your own interfaces.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

good point. Fixed.

@zolia zolia requested review from vkuznecovas and tadovas December 7, 2018 13:11
@zolia zolia force-pushed the feature/destroy-session branch from 626a883 to f00d582 Compare December 7, 2018 13:25
@zolia zolia force-pushed the feature/destroy-session branch from f00d582 to 487da2b Compare December 7, 2018 13:39
@zolia zolia force-pushed the feature/destroy-session branch from 9a00217 to 1601201 Compare December 7, 2018 15:20
@@ -51,12 +51,19 @@ type PromiseProcessor interface {
Stop() error
}

// MemorySessionStorage interface to session storage
type MemorySessionStorage interface {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why it's memory? Simply SessionStorage. Structure satisfying this interface and keeping sessions in memory could be called that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Since we are in sessions package already. That would give us sessions sessions...
We could call just "Storage" in that case.

Copy link
Member

Choose a reason for hiding this comment

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

I think just session.Storage is the best choice.

@zolia zolia force-pushed the feature/destroy-session branch from 1601201 to b3ede37 Compare December 10, 2018 07:48
@zolia zolia requested a review from tadovas December 10, 2018 07:50
vkuznecovas
vkuznecovas previously approved these changes Dec 10, 2018
soffokl
soffokl previously approved these changes Dec 10, 2018
Copy link
Contributor

@tadovas tadovas left a comment

Choose a reason for hiding this comment

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

Naming

// createConsumer processes session create requests from communication channel.
type createConsumer struct {
SessionManager Manager
SessionManager Creator
Copy link
Contributor

Choose a reason for hiding this comment

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

SessionManager var of type Creator sounds weird. Also it's not needed to be public

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed

@zolia zolia dismissed stale reviews from soffokl and vkuznecovas via 3469ec8 December 10, 2018 08:04
@zolia zolia requested review from vkuznecovas and tadovas December 10, 2018 08:05
@zolia zolia merged commit 9305dc5 into master Dec 10, 2018
@zolia zolia deleted the feature/destroy-session branch December 10, 2018 08:23
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.

4 participants