Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

WIP: feat/pubsub #471

Closed
wants to merge 15 commits into from
Closed

WIP: feat/pubsub #471

wants to merge 15 commits into from

Conversation

daviddias
Copy link
Contributor

@daviddias daviddias commented Dec 6, 2016

From @haadcode #470

This PR will add complete go-ipfs Pubsub API.

Missing:

  • Documentation

Dependencies:

@daviddias
Copy link
Contributor Author

daviddias commented Dec 6, 2016

@haadcode having troubles with this PR, now that I added (manually) the missing test files, it is missing other modules. Could you fetch this branch and try to run yourself and see which files are missing? I'm getting it was just the original PR that was missing things and you have the code in your machine.

UPDATE: Seems I managed to get the tests to run, it fails in the browser though.

@daviddias
Copy link
Contributor Author

@haadcode also, can you make a PR to js-ipfsd-ctl with the changes you made?

@daviddias daviddias changed the title WIP: feat/floodsub WIP: feat/pubsub Dec 6, 2016
// If we're already subscribed, return an error
if (subscriptions[topic]) {
return callback(new Error(`Already subscribed to '${topic}'`))
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

If we have several subscriptions, we just need to feed the messages to all of them.

@daviddias daviddias changed the title WIP: feat/pubsub WIP: feat/floodsub Dec 6, 2016
@daviddias daviddias changed the title WIP: feat/floodsub WIP: feat/pubsub Dec 6, 2016
@daviddias daviddias mentioned this pull request Dec 6, 2016
3 tasks
@daviddias daviddias removed their assignment Dec 7, 2016
@daviddias daviddias changed the title WIP: feat/pubsub WIP: feat/floodsub Dec 7, 2016
@haadcode haadcode changed the title WIP: feat/floodsub WIP: feat/pubsub Dec 9, 2016
@@ -57,11 +57,13 @@ module.exports = (send) => {
}
},
publish: promisify((topic, data, callback) => {
const buf = Buffer.isBuffer(data) ? data : new Buffer(data)
if (!Buffer.isBuffer(data)) {
return callback(new Error('data must be a Buffer'))
Copy link
Contributor Author

Choose a reason for hiding this comment

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

<3

@@ -64,7 +64,7 @@
"gulp": "^3.9.1",
"hapi": "^16.0.1",
"interface-ipfs-core": "^0.22.1",
"ipfsd-ctl": "^0.17.0",
"@haad/ipfsd-ctl": "^0.18.0-beta.5",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Needs to be updated

haadcode and others added 6 commits December 21, 2016 16:46
Add dagnode-stream to transform file results to DAGNode objects.
Add stream-to-value to convert a response stream to a single value.
Refactor request-api so that chunked JSON objects are not buffered anymore. This touches a bunch of the files pushing the transform function down to the individual commands.
@dignifiedquire
Copy link
Contributor

Closing in favor of #493

@haadcode
Copy link
Contributor

Remind me @dignifiedquire @diasdavid that we need to talk about strategy/process for releasing dev versions in the future and handling dependencies in a sane way.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants