-
Notifications
You must be signed in to change notification settings - Fork 314
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
Conversation
b56fbb4
to
59313c1
Compare
59313c1
to
ab6ff2d
Compare
ab6ff2d
to
bd90750
Compare
session/destroy_consumer.go
Outdated
|
||
// destroyConsumer processes session create requests from communication channel. | ||
type destroyConsumer struct { | ||
SessionManager Manager |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good point. Fixed.
626a883
to
f00d582
Compare
f00d582
to
487da2b
Compare
9a00217
to
1601201
Compare
session/manager.go
Outdated
@@ -51,12 +51,19 @@ type PromiseProcessor interface { | |||
Stop() error | |||
} | |||
|
|||
// MemorySessionStorage interface to session storage | |||
type MemorySessionStorage interface { |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
1601201
to
b3ede37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Naming
session/create_consumer.go
Outdated
// createConsumer processes session create requests from communication channel. | ||
type createConsumer struct { | ||
SessionManager Manager | ||
SessionManager Creator |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
Destroys session on failed connect or disconnect.