Managing a cluster of janus instances. First Register janus instances through an HTTP endpoint, then let handlers do the necessary wiring. Currently there's only one handler available for the cargomedia/janus-gateway-rtpbroadcast plugin.
Install as npm package:
npm install janus-cluster-manager [-g]
Run service using:
bin/janus-cluster-manager --port <http-server-port>
Clone project, install npm dependencies and run binary:
npm install
bin/janus-cluster-manager
Used to register janus instances into the cluster. Each registered instance will also trigger events intercepted by handlers.
POST /register
Name | Type | Description |
---|---|---|
id | string | instance identifier |
data | string | json encoded string containing instance's extra data |
Returns available edge server
GET /rtpbroadcast/edge-server
{
"id": "<server-id>",
"webSocketAddress": "<web-socket-address>",
"httpAddress": "<http-address>"
}
To run tests npm run-script test
- update package.json with a new version
- release a new git tag with the updated package.json
After that the npm release should be done automatically. If it didn't happen then release it manually:
npm publish https://github.com/cargomedia/janus-cluster-manager/archive/<GitTagWithUpdatedPackageJson>.tar.gz