View Source MyspaceIPFS.PubSub (Myspace IPFS v0.1.0)

MyspaceIPFS.PubSub is where the pubsub commands of the IPFS API reside.

Link to this section Summary

Functions

Cancel a subscription to a topic.

List the topics you are currently subscribed to.

List the peers you are currently connected to.

Publish a message to a topic.

Show the current pubsub state.

Subscribe to messages on a topic and listen for them.

List the subscriptions you have.

Link to this section Functions

@spec cancel(atom()) :: okresult()

Cancel a subscription to a topic.

parameters

Parameters

https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-cancel topic - The topic to cancel the subscription to.

@spec ls() :: okresult()

List the topics you are currently subscribed to.

@spec peers(atom()) :: okresult()

List the peers you are currently connected to.

parameters

Parameters

https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-peers topic - The topic to list peers for.

@spec pub(name(), name()) :: okresult()

Publish a message to a topic.

parameters

Parameters

https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-pub topic - The topic to publish to. data - The data to publish.

@spec state() :: okresult()

Show the current pubsub state.

@spec sub(atom()) :: okresult()

Subscribe to messages on a topic and listen for them.

parameters

Parameters

https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-sub topic - The topic to subscribe to.

@spec subs() :: okresult()

List the subscriptions you have.

options

Options

https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-subs ipns-base - Base used for keys.