Skip to content
项目
群组
代码片段
帮助
正在加载...
登录
切换导航
F
freeswitch
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
张华
freeswitch
Commits
65b3927f
提交
65b3927f
authored
5月 04, 2017
作者:
Anthony Minessale
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
updates for events
上级
69b45859
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
52 行增加
和
10 行删除
+52
-10
flow1.json
libs/libblade/flows/flow1.json
+52
-10
没有找到文件。
libs/libblade/flows/flow1.json
浏览文件 @
65b3927f
...
...
@@ -37,7 +37,7 @@ Sec-WebSocket-Protocol: blade-1.0
"session-id"
:
"5b696e8d-9875-45a5-b347-3b9fc288bad3"
,
"master-id"
:
"5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d"
,
"realm-list"
:
[{
"realm"
:
"ls1.mydomain.com"
}]
"allowed-
blapi
"
:
[
"BLADE"
],
"allowed-
protocol
"
:
[
"BLADE"
],
}
}
...
...
@@ -73,7 +73,7 @@ Sec-WebSocket-Protocol: blade-1.0
"jsonrpc"
:
"2.0"
,
"method"
:
"BLADE.register"
,
"params"
:
{
"
realm-zone
"
:
"myspace"
,
"
sub-realm
"
:
"myspace"
,
"realm"
:
"ls1.mydomain.com"
,
"session-id"
:
"5b696e8d-9875-45a5-b347-3b9fc288bad3"
,
"master-id"
:
"5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d"
,
...
...
@@ -86,9 +86,9 @@ Sec-WebSocket-Protocol: blade-1.0
"jsonrpc"
:
"2.0"
,
"id"
:
3
,
"result"
:
{
"
realm-zone
"
:
"myspace"
,
"
sub-realm
"
:
"myspace"
,
"realm"
:
"ls1.mydomain.com"
,
"realm-list"
:
[{
"realm"
:
"ls1.mydomain.com"
,
"
zone
s"
:
[
"myspace"
]}],
"realm-list"
:
[{
"realm"
:
"ls1.mydomain.com"
,
"
sub-realm
s"
:
[
"myspace"
]}],
"session-id"
:
"5b696e8d-9875-45a5-b347-3b9fc288bad3"
,
"master-id"
:
"5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d"
,
}
...
...
@@ -96,13 +96,13 @@ Sec-WebSocket-Protocol: blade-1.0
--->
PUBLISH
API
LSAPI
"A single node must have exlusive access to the
BLAPI
's namespace with the master to publish"
--->
PUBLISH
API
LSAPI
"A single node must have exlusive access to the
PROTOCOL
's namespace with the master to publish"
//
MAYBE
ADD
SCHEMA
and
method
to
fetch
it.
{
"jsonrpc"
:
"2.0"
,
"method"
:
"BLADE.publish"
,
"params"
:
{
"
blapi
"
:
"LSAPI"
,
"
protocol
"
:
"LSAPI"
,
"realm"
:
"ls1.mydomain.com"
,
"session-id"
:
"5b696e8d-9875-45a5-b347-3b9fc288bad3"
,
"master-id"
:
"5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d"
,
...
...
@@ -116,8 +116,8 @@ Sec-WebSocket-Protocol: blade-1.0
"jsonrpc"
:
"2.0"
,
"id"
:
4
,
"result"
:
{
"
blapi
"
:
"LSAPI"
,
"allowed-
blapi
"
:
[
"BLADE"
,
"LSAPI"
],
"
protocol
"
:
"LSAPI"
,
"allowed-
protocol
"
:
[
"BLADE"
,
"LSAPI"
],
"session-id"
:
"5b696e8d-9875-45a5-b347-3b9fc288bad3"
,
"master-id"
:
"5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d"
,
}
...
...
@@ -130,7 +130,8 @@ Sec-WebSocket-Protocol: blade-1.0
"jsonrpc"
:
"2.0"
,
"method"
:
"BLADE.execute"
,
"params"
:
{
"blapi"
:
"LSAPI"
,
"realm"
:
"ls1.mydomain.com"
,
"protocol"
:
"LSAPI"
,
"params"
:
{
"path"
:
"/tmp/testing"
}
...
...
@@ -145,10 +146,51 @@ Sec-WebSocket-Protocol: blade-1.0
"jsonrpc"
:
"2.0"
,
"id"
:
5
,
"result"
:
{
"blapi"
:
"LSAPI"
,
"realm"
:
"ls1.mydomain.com"
,
"protocol"
:
"LSAPI"
,
"result"
:
{
"listing"
:
"-rw-r--r-- 1 root root 33881 May 3 17:22 blank_avatar.png
\n
drwxr-xr-x 6 root root 4096 Oct 26 2016 dash.js
\n
-rw-r--r-- 1 root root 5266 May 3 17:20 foo.diff
\n
-rw-r--r-- 1 root root 485 May 3 17:22 ks.diff"
},
}
}
Endpoints
subscribe
to
event
channels
on
their
Master.
If
that
Master
is
not
the
top
tier
Master
,
it
in
turn
subscribes
all
of
its
distinct
events
to
it's
Master
until
it
reaches
the
top
tier.
When
the
Master
is
encounterd
who
holds
a
connection
to
the
Controller
for
a
particular
protocol
,
the
Master
subscribes
to
that
Controller.
--->
EVENT
SUB
{
"jsonrpc"
:
"2.0"
,
"method"
:
"BLADE.subscribe"
,
"params"
:
{
"realm"
:
"ls1.mydomain.com"
,
"protocol"
:
"LSAPI"
,
"event-space"
:
"LSAPI"
,
"params"
:
{
"eventChannel"
:
"someEvent"
,
"subParams"
:
{
"foo"
:
"bar"
}
}
"session-id"
:
"5b696e8d-9875-45a5-b347-3b9fc288bad3"
,
"master-id"
:
"5164f7f8-a6ca-4dd4-8f36-33db1dc9c35d"
,
},
"id"
:
6
}
<---
SUCCESS
(TBD
FAIL
CASE)
{
"jsonrpc"
:
"2.0"
,
"id"
:
6
,
"result"
:
{
"realm"
:
"ls1.mydomain.com"
,
"protocol"
:
"LSAPI"
,
"event-space"
:
"LSAPI"
,
"result"
:
{
"subscribedChannels"
:
[
"someEvent"
],
"unauthorizedChannels"
:
[],
"alreadySubscribedChannels"
:
[]
},
}
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论