Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

example: update diagram in readme #70

Merged
merged 1 commit into from
Jun 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,8 @@ Frontier需要微服务和边缘节点两方都主动连接到Frontier,Service

### 示例

**聊天室**

目录[examples/chatroom](./examples/chatroom)下有简单的聊天室示例,仅100行代码实现一个的聊天室功能,可以通过

```
Expand All @@ -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功能。

### 微服务如何使用

Expand Down
Binary file added docs/diagram/rtmp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 7 additions & 2 deletions examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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 chatroom
make clean -C rtmp
Loading