From 4761c2dd20e354f649ed2e5ebfce80870e535120 Mon Sep 17 00:00:00 2001 From: moonrailgun Date: Sat, 4 May 2024 00:07:23 +0800 Subject: [PATCH] docs: add example of docker pull image size --- website/docs/monitor/custom-script.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/website/docs/monitor/custom-script.md b/website/docs/monitor/custom-script.md index bd87a29..2f4a99d 100644 --- a/website/docs/monitor/custom-script.md +++ b/website/docs/monitor/custom-script.md @@ -10,7 +10,7 @@ Here is some example ## Examples -### get available service number from health endpoint +### get tailchat available service number from health endpoint ```js const res = await request({ @@ -34,6 +34,20 @@ const res = await request({ return res.data.stargazers_count ?? -1 ``` +replace `msgbyte/tianji` to your own repo name + +### get docker pull count + +```js +const res = await request({ + url: "https://hub.docker.com/v2/repositories/moonrailgun/tianji/" +}); + +return res.data.pull_count; +``` + +replace `moonrailgun/tianji` to your own image name + ### or more