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

Enhancement/rename streams to router #92

Merged
merged 20 commits into from
Apr 19, 2017

Conversation

msiebeneicher
Copy link
Contributor

@msiebeneicher msiebeneicher commented Apr 6, 2017

This PR is related to issue #80

What this PR does:

  • Moved stream to router
  • Renamed simplestream.go to simplerouter.go
  • Renamed stream.go to router.go
  • Renamed Stream interface to Router interface
  • Renamed router related functions and vars
  • Renamed router.route to router.distributer
  • Fixed issue with gollum -l
  • Fixed bug related to distribute routing

@msiebeneicher msiebeneicher added this to the v0.5.0 milestone Apr 6, 2017
@msiebeneicher msiebeneicher changed the title [WIP] Enhancement/rename streams to router Enhancement/rename streams to router Apr 7, 2017
@andygrunwald andygrunwald requested a review from ppar April 18, 2017 06:49
core/message.go Outdated
func (msg *Message) GetStream() Stream {
return StreamRegistry.GetStreamOrFallback(msg.streamID)
// GetRouter returns the stream object behind the current StreamID.
func (msg *Message) GetStream() Router {
Copy link
Contributor

Choose a reason for hiding this comment

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

Function should be renamed

core/message.go Outdated
}

// GetPreviousStream returns the stream object behind the previous StreamID.
func (msg *Message) GetPreviousStream() Stream {
return StreamRegistry.GetStreamOrFallback(msg.prevStreamID)
func (msg *Message) GetPreviousStream() Router {
Copy link
Contributor

Choose a reason for hiding this comment

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

Function should be renamed

@@ -218,7 +218,7 @@ func (cons *SimpleConsumer) Enqueue(data []byte) {
// EnqueueWithSequence works like Enqueue but allows to set a custom sequence
// number. The internal sequence number is not incremented by this function.
func (cons *SimpleConsumer) EnqueueWithSequence(data []byte, seq uint64) {
numStreams := len(cons.streams)
numStreams := len(cons.routers)
Copy link
Contributor

Choose a reason for hiding this comment

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

rename variable to numRouters

// AddAllWildcardProducersToAllStreams executes AddWildcardProducersToStream on
// all currently registered streams
// AddAllWildcardProducersToAllStreams executes AddWildcardProducersToRouter on
// all currently registered routers
func (registry *streamRegistry) AddAllWildcardProducersToAllStreams() {
Copy link
Contributor

Choose a reason for hiding this comment

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

rename function

@msiebeneicher
Copy link
Contributor Author

@arnecls : PR is updated

@arnecls arnecls merged commit 5308212 into master Apr 19, 2017
@msiebeneicher msiebeneicher deleted the enhancement/rename_streams_to_router branch April 19, 2017 10:59
@ppar ppar removed their request for review April 19, 2017 13:16
@arnecls arnecls added this to Done in v0.5.0 Apr 24, 2017
@arnecls arnecls modified the milestone: v0.5.0 May 17, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants