apache / openwhisk-catalog

Curated catalog of Apache OpenWhisk packages to interface with event producers and consumers
https://openwhisk.apache.org/
Apache License 2.0
33 stars 49 forks source link

README.md should have content about catalog #135

Closed csantanapr closed 7 years ago

csantanapr commented 8 years ago

Take the content from catalog.md located here https://github.com/openwhisk/openwhisk/blob/master/docs/catalog.md

And paste in README.md but only the parts that are located in this repo

csantanapr commented 8 years ago

@bjustin-ibm can help with the websocket section

jberstler commented 8 years ago

The websocket/send action is very simple and straightforward. I think the following should suffice:

## Using the WebSocket package

The `/whisk.system/websocket` package offers a convenient way post messages to a WebSocket.

The package includes the following action:

| Entity | Type | Parameters | Description |
| --- | --- | --- | --- |
| `/whisk.system/websocket` | package | uri | Utilities for communicating with WebSockets |
| `/whisk.system/websocket/send` | action | uri, payload | Send the payload to the WebSocket URI |

If you plan to send many messages to the same WebSocket URI, creating a package binding with the `uri` value is suggested.  With binding, you don't need to specify the value each time that you use the `send` action.

### Sending a message to a WebSocket

The `/whisk.system/websocket/send` action will send a payload to a WebSocket URI. The parameters are as follows:

- `uri`: The URI of the websocket server (e.g. ws://mywebsockethost:80)
- `payload`: The message you wish to send to the WebSocket