0.1.1 • Published 8 years ago

janus-cluster v0.1.1

Weekly downloads
1
License
MIT
Repository
github
Last release
8 years ago

janus-cluster

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.

Installation

Install as npm package:

npm install janus-cluster [-g]

Run service using:

bin/janus-cluster --port <http-server-port>

Development

Clone project, install npm dependencies and run binary:

npm install
bin/janus-cluster

API

Core

Register new instance

Used to register janus instances into the cluster. Each registered instance will also trigger events intercepted by handlers.

POST /register
Input
NameTypeDescription
idstringinstance identifier
datastringjson encoded string containing instance's extra data

Rtpbroadcast

Get edge server

Returns available edge server

GET /rtpbroadcast/edge-server
Response
{
  "id": "<server-id>",
  "webSocketAddress": "<web-socket-address>",
  "httpAddress": "<http-address>"
}