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 Service & Service Object for PubSub #944

Merged

Conversation

stephenplusplus
Copy link
Contributor

For #904

This hooks Pub/Sub up with Service & ServiceObject.

@stephenplusplus stephenplusplus added the api: pubsub Issues related to the Pub/Sub API. label Nov 14, 2015
@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Nov 14, 2015
@callmehiphop
Copy link
Contributor

Instead of using a multiple inheritance lib, what are your feelings on just having ServiceObject extend EventEmitter? I realize that this will add event emitter methods to all service classes, however they'll be undocumented and won't really bring any overhead.

@stephenplusplus
Copy link
Contributor Author

That sounds a little crazy. Why would we do that?

@callmehiphop
Copy link
Contributor

Well if you just create a prototype chain, then you can have something inherit for multiple "classes". And it seems to me that the only reason we're even including a multiple inheritance lib is because on certain objects we want to use EventEmitter but we're already extending a ServiceObject.

@stephenplusplus
Copy link
Contributor Author

That is why we're using it. But that's the only place we need it, so I
don't think it's more logical to make all classes event emitters.

On Saturday, November 14, 2015, Dave Gramlich [email protected]
wrote:

Well if you just create a prototype chain, then you can have something
inherit for multiple "classes". And it seems to me that the only reason
we're even including a multiple inheritance lib is because on certain
objects we want to use EventEmitter but we're already extending a
ServiceObject.


Reply to this email directly or view it on GitHub
#944 (comment)
.

@callmehiphop
Copy link
Contributor

Well, that's not true - #939 is also using it to extend both an event emitter and service object.

@stephenplusplus
Copy link
Contributor Author

The point is not all. I don't think we want all of our classes to be event
emitters, just the ones that need it.

On Saturday, November 14, 2015, Dave Gramlich [email protected]
wrote:

Well, that's not true - #939
#939 is also
using it to extend both an event emitter and service object.


Reply to this email directly or view it on GitHub
#944 (comment)
.

@callmehiphop
Copy link
Contributor

Fair enough!

callmehiphop added a commit that referenced this pull request Nov 14, 2015
Implement Service & Service Object for PubSub
@callmehiphop callmehiphop merged commit 2872df8 into googleapis:master Nov 14, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: pubsub Issues related to the Pub/Sub API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants