Skip to content

Commit

Permalink
Add heartbeat API.
Browse files Browse the repository at this point in the history
  • Loading branch information
winlinvip committed Apr 12, 2024
1 parent 9fc0241 commit cf1f78e
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ heartbeat {
By enable the `summaries`, you can get the SRS server states, such as `self.pid` and `self.srs_uptime`, so you
can use this to determine whether SRS restarted.

> Note: About fileds of `summaries`, see [HTTP API: summaries](./http-api.md#summaries) for details.
## Go Example

Write Go code to handle SRS callback, for example, handling `on_publish`:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ heartbeat {

通过启用`summaries`,您可以获取SRS服务器状态,例如`self.pid``self.srs_uptime`,因此您可以使用它来判断SRS是否重新启动。

> Note: 关于`summaries`的字段,请参阅 [HTTP API: summaries](./http-api.md#summaries) 了解详细信息。
## Go Example

使用Go处理SRS的回调,以`on_publish`为例:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,8 @@ heartbeat {

通过启用`summaries`,您可以获取SRS服务器状态,例如`self.pid``self.srs_uptime`,因此您可以使用它来判断SRS是否重新启动。

> Note: 关于`summaries`的字段,请参阅 [HTTP API: summaries](./http-api.md#summaries) 了解详细信息。
## Go Example

使用Go处理SRS的回调,以`on_publish`为例:
Expand Down
2 changes: 2 additions & 0 deletions versioned_docs/version-5.0/doc/http-callback.md
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,8 @@ heartbeat {
By enable the `summaries`, you can get the SRS server states, such as `self.pid` and `self.srs_uptime`, so you
can use this to determine whether SRS restarted.

> Note: About fileds of `summaries`, see [HTTP API: summaries](./http-api.md#summaries) for details.
## Go Example

Write Go code to handle SRS callback, for example, handling `on_publish`:
Expand Down

0 comments on commit cf1f78e

Please sign in to comment.