example: update diagram in readme

This commit is contained in:
singchia
2024-06-21 17:19:12 +08:00
parent aeb0cd3bd3
commit efe54559ff
4 changed files with 23 additions and 2 deletions

View File

@@ -28,6 +28,7 @@ examples:
make -C examples
mv examples/iclm/bin/* ./bin/ && rm -rf examples/iclm/bin
mv examples/chatroom/bin/* ./bin/ && rm -rf examples/chatroom/bin
mv examples/rtmp/bin/* ./bin/ && rm -rf examples/rtmp/bin
# clean
.PHONY: clean

View File

@@ -123,6 +123,8 @@ Frontier需要微服务和边缘节点两方都主动连接到FrontierService
### 示例
**聊天室**
目录[examples/chatroom](./examples/chatroom)下有简单的聊天室示例仅100行代码实现一个的聊天室功能可以通过
```
@@ -135,6 +137,19 @@ https://github.com/singchia/frontier/assets/15531166/18b01d96-e30b-450f-9610-917
在这个示例你可以看到上线离线通知消息Publish等功能。
**直播**
目录[examples/rtmp](./examples/rtmp)下有简单的直播示例仅80行代码实现一个的直播代理功能可以通过
```
make examples
```
在bin目录下得到```rtmp_service```和```rtmp_edge```可执行程序,运行后,使用[OBS](https://obsproject.com/)连接rtmp_edge即可直播代理
<img src="./docs/diagram/rtmp.png" width="100%" height="100%">
在这个示例你可以看到Multiplexer和Stream功能。
### 微服务如何使用

BIN
docs/diagram/rtmp.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 KiB

View File

@@ -2,7 +2,7 @@ GOHOSTOS?=$(shell go env GOHOSTOS)
GOARCH?=$(shell go env GOARCH)
.PHONY: all
all: iclm chatroom
all: iclm chatroom rtmp
.PHONY: iclm
iclm:
@@ -12,7 +12,12 @@ iclm:
chatroom:
make -C chatroom
.PHONY: rtmp
rtmp:
make -C rtmp
.PHONY: clean
clean:
make clean -C iclm
make clean -C chatroom
make clean -C rtmp