wetware / pkg

Peer-to-peer cloud environment
https://wetware.run
Other
38 stars 7 forks source link

Add pubsub capability to embedded ww server #121

Closed aratz-lasa closed 1 year ago

aratz-lasa commented 1 year ago

This pull request adds the pubsub capability to the embedded WW server in order to enhance its functionality.

The main changes in this PR include:

  1. The addition of the PubSubProvider field to the Node struct, which represents a pubsub provider for the server.
  2. Modification of the Join method in the Node struct to initialize the pubsub provider using the j.pubsub function, passing the appropriate parameters.
  3. In the Join method, the PubSubProvider field is assigned the value returned by the j.pubsub function.
  4. In the vat.Export function call within the Join method, the PubSubProvider is included as part of the host.Server struct.

These changes enable the embedded WW server to support pubsub functionality, allowing for efficient communication and message distribution between connected clients.