Properties
pubsub
pubsub: { getSubscribers(component,
topic): Promise<PeerId[]>; getTopics(component): Promise<string[]>; publish(component,
topic,
message): Promise<void>; subscribe(component,
topic): Promise<void>; unsubscribe(component,
topic): Promise<void>; } Type declaration
getSubscribers:function
- getSubscribers(component, topic): Promise<PeerId[]>
Parameters
- component: string
- topic: string
getTopics:function
publish:function
- publish(component, topic, message): Promise<void>
subscribe:function
- subscribe(component, topic): Promise<void>
Parameters
- component: string
- topic: string
unsubscribe:function
- unsubscribe(component, topic): Promise<void>
Parameters
- component: string
- topic: string
Methods
closeConnection
- closeConnection(peerId, options?): Promise<void>
init
- init(options?): Promise<{
capabilities: Record<string, string[]>;
debug: string;
peers: Peer[];
self: Peer;
}> Returns Promise<{
capabilities: Record<string, string[]>;
debug: string;
peers: Peer[];
self: Peer;
}>
openConnection
- openConnection(peerIdOrMultiaddr, options?): Promise<void>
setDebug
- setDebug(namespace?): Promise<void>
Parameters
Optional
namespace: string
RPC operations exposed by the metrics